Make Run Tasks
A native VS Code task explorer for documented Makefile targets.
1. Details
1.1. Prerequisites
1.2. Usage
Insights and Details
Specification
The Make Run Tasks Specification is the normative reference for annotation syntax and externally observable behavior.
Activity Bar
Dedicated Makefile icon and target explorer in the Activity Bar.
Explorer
Target grouping by workspace, Makefile, and category when necessary.
Execution
Target execution as native VS Code tasks from the explorer.
Quick Pick
Keyboard-driven target selection and execution.
Batch Execution
Check multiple targets and run them in sequence or in parallel, with cancellable progress.
Editor Actions
Run documented targets directly from CodeLens links above Makefile rules.
Navigation
Click a target name to open its Makefile definition. Run it with the inline play action.
Workspace
Multi-root workspace and multiple-Makefile support.
Auto-refresh
Automatic target refresh after matching Makefile changes when makefileTasks.autoRefresh is enabled.
Configuration
Configurable Make command, discovery globs, exclusions, sorting, editor actions, and automatic refresh.
Usage and Instructions
Tasks
The extension discovers documented Makefile targets and presents them as VS Code tasks. A target is discoverable when it has a non-empty preceding or inline ## description. The extension ignores undocumented targets, helper rules, pattern rules, variable assignments, and unsupported target names.
## Single-line description for the build task
build:
go build ./...
.PHONY: build
test: ## Inline description for the test task
go test ./...
.PHONY: test
Categorization
Organize tasks with canonical section comments. The extension groups tasks by category in the Activity Bar explorer and places uncategorized tasks under Uncategorized.
# ─── Skills Manager ────────────────────────────────────────────────────
skills-agent-add: ## Provision Agent Skills
skills add ./skills
skills-agent-update: ## Update Agent Skills
skills update ./skills
# --- Dependencies ------------------------------------------------------
dependency-update: ## Update project dependencies
renovate --platform=local
# === Test ==============================================================
test: ## Run the test suite
go test ./...
Input Metadata
Document expected positional arguments or Make variable assignments with optional # Usage: metadata. Usage metadata is descriptive and does not validate or supply runtime arguments.
# Usage: make deploy ENV=<name> [VERSION=<version>]
#
deploy: ## Deploy the application
./scripts/deploy --env "$(ENV)" --version "$(VERSION)"
.PHONY: deploy
Invocation
Run targets with positional arguments or Make variable assignments through Run Target with Arguments or makefileTarget task definitions.
# Usage: make build [MODE=<mode>]
#
build: ## Build the application
go build -tags "$(MODE)" ./...
.PHONY: build
Run multiple targets
- Open Make Run Tasks and click Toggle Multi-select Mode (the checklist icon).
- Check targets, or click their names, in the order you want to run them. The explorer shows the selected count and order numbers beside checked targets. Selections persist when categories are collapsed and across refreshes; targets from different Makefiles or workspace folders stay distinct.
- Click either toolbar action to start immediately: Run in Sequence (the ordered-list icon) or Run in Parallel (the run-all icon).
Sequential execution waits for each task to finish and stops on failure or termination. Parallel execution starts each target as a separate VS Code task with its own terminal; use it for independent tasks. Both modes use each target's own Makefile directory. Cancel in the progress notification terminates this batch's running tasks and skips remaining targets. Selections are retained for another run; Clear Selection clears them, and leaving multi-select mode restores click-to-navigate behavior. Outside multi-select mode, click a target's name to open its Makefile definition, or click its inline play action to run it. The single-target picker remains available through Make Run Tasks: Run Target… in the Command Palette.
Run from the Makefile editor
Above each documented target, ▶ Run target runs it immediately and Run target with Arguments… opens the existing argument input. Rules with multiple target names have separate links for each target. Lenses follow the current editor text. Before an explorer or editor action runs, any selected Makefile with unsaved changes is saved and its targets are checked again.
Editor actions follow makefileTasks.fileGlobs and makefileTasks.excludeGlob and apply to files inside workspace folders. They use the same ## documentation requirement as the explorer. Disable them with "makefileTasks.codeLens": false; VS Code's editor.codeLens must also be enabled.
1.3. MCP Server
The optional stdio MCP server exposes the extension's Makefile parser to AI agents without executing Make. Its list_make_targets tool returns documented targets, descriptions, categories, usage metadata, and zero-based source lines.
npm install
npm run mcp:start
The server reads workspace-relative Makefile paths from the current directory. Set MAKE_TASKS_MCP_ROOT to use another workspace root. Requests that resolve outside that root are rejected.
Example tool input:
{
"makefile": "Makefile"
}
Build and exercise the server with MCP Inspector:
npm run mcp:inspect
The server uses stdout exclusively for MCP messages and writes its readiness message to stderr.
2. Contribution
Insights and Details
Usage and Instructions
Tasks
The repository Makefile provides documented targets for installing dependencies, validating changes, building, packaging, and installing the extension locally.
make vsce-dependencies
make vsce-build
make vsce-package
make vsce-install
VSIX artifacts are written to the Git-ignored out/ directory. Run npm run package to generate out/make-run-tasks-<version>.vsix.
Make Run Tasks is a fork of sentenz/vscode-make-tasks. The original license and copyright notice are retained in LICENSE.