Aspire Visual Studio Code extension
The official Aspire extension for Visual Studio Code turns VS Code into a first-class environment for building, debugging, and shipping polyglot Aspire apps.
Press
Install the extension
Section titled “Install the extension”- Open VS Code.
- Open the Extensions view (
Command + Shift + XCommandShiftXControl + Shift + XCtrlShiftXControl + Shift + XCtrlShiftX ). - Search for Aspire and install the extension published by Microsoft, or install it directly from the VS Code Marketplace.
Getting started
Section titled “Getting started”- Open an existing Aspire project in VS Code, or create one with Aspire: New Aspire project from the Command Palette (
Command + Shift + PCommandShiftPControl + Shift + PCtrlShiftPControl + Shift + PCtrlShiftP ). - Run Aspire: Configure launch.json file to set up the debug configuration.
- Press
F5F5F5F5F5F5 to start debugging your Aspire app. The extension discovers the AppHost, starts the app, attaches supported debuggers, and opens the dashboard.
Open a repo, let the extension find the AppHost, press

The Aspire: New Aspire project command, showing starter templates for Blazor, React + C#, Express + TypeScript, FastAPI + TypeScript, and an empty AppHost.
The extension discovers your AppHost from aspire.config.json, so both project-based C# AppHosts (*.csproj) and TypeScript AppHosts (apphost.mts) work without extra configuration.
Scaffold and add integrations
Section titled “Scaffold and add integrations”The Command Palette has commands for the most common tasks:
- Aspire: Add an integration offers a selection of hosting integrations (
Aspire.Hosting.*) to add to your AppHost. - Aspire: Initialize Aspire in an existing codebase wires Aspire into a repo that has not yet been Aspirified.
- Aspire: Update integrations updates hosting integrations and the Aspire SDK.
- Aspire: Open Aspire terminal drops you into a terminal with the Aspire CLI already on
PATHfor anything the UI doesn’t cover. - Aspire: Update Aspire CLI and Aspire: Install Aspire CLI let you manage CLI installation. Install Aspire CLI shows a package-manager picker (WinGet, Homebrew, npm, .NET tool, or mise, depending on your platform) plus a Daily build (dev) option and a link to the full installation guide for every option, including the install script.
Let coding agents use Aspire language model tools
Section titled “Let coding agents use Aspire language model tools”The Aspire extension provides VS Code language model tools that let coding agents manage AppHosts, inspect resources, and attach debuggers. Aspire 13.6 added the start and stop tools; Aspire 17.0 added the rest. The resource debug tool requires Aspire extension v1.25.0 or later, and the other 17.0 tools require v1.24.0 or later:
| Tool | Chat reference | Action |
|---|---|---|
aspire_apphost_start | #aspireStartAppHost | Start a discovered AppHost in run or debug mode. |
aspire_apphost_stop | #aspireStopAppHost | Stop the selected discovered AppHost. |
aspire_resource_debug | #aspireDebugResource | Attach the debugger to a running .NET or Go resource. |
aspire_debug_session_status | #aspireDebugSessionStatus | Report the state of an AppHost, or the type, state, health, exit code, and source of one of its resources. |
aspire_list_debug_sessions | #aspireListDebugSessions | List active AppHosts controlled by this editor, with their state, mode, and controller. |
aspire_explain_launch_failure | #aspireExplainLaunchFailure | Explain the latest launch failure for an AppHost as a failure stage, category, and recommended actions. |
aspire_hot_reload_status | #aspireHotReloadStatus | Report whether C# Dev Kit Hot Reload is enabled and could apply to a resource, and what to restart when it can’t. |
aspire_open_dashboard | #aspireOpenDashboard | Open the dashboard for an AppHost controlled by this editor. |
aspire_open_output | #aspireOpenOutput | Open the VS Code Output panel on the Aspire Extension channel. |
The inspection tools return summaries without raw logs, output, environment variables, process IDs, or URLs. Use the Output panel or dashboard for more details. The Hot Reload tool only reports applicability; it never applies or verifies an edit.
Open a trusted workspace with the Aspire extension installed and an AppHost visible in the Aspire view. In an agent chat that supports VS Code tools, try:
Use #aspireStartAppHost to start my discovered AppHost in debug mode.
Use #aspireDebugResource to attach the debugger to the api resource.
Use #aspireStopAppHost to stop that AppHost.
The start, stop, resource debug, and output tools request confirmation before acting. Review the resolved target and, for start, the requested mode before approving. These are extension-provided tools; configuring a runtime MCP server isn’t required to use them.
The start tool accepts these inputs:
| Input | Required | Description |
|---|---|---|
appHostPath | Yes | The workspace-relative path of a discovered AppHost. |
mode | Yes | Use run to start without a debugger or debug to attach supported debuggers. |
isolated | No | Use true for randomized ports and isolated user secrets or false to disable isolation. Linked Git worktrees use isolation when omitted. |
launchProfile | No | The exact profile name from the AppHost’s launchSettings.json file. |
The tools accept only buildable AppHosts returned by the extension’s discovery service, not arbitrary filesystem paths supplied by an agent. If a start or stop selector is unknown or ambiguous, the result includes knownAppHosts so the agent can choose a discovered target. Multi-root workspaces use folder-qualified selectors.
Before starting, the extension checks its own sessions and running AppHosts to avoid duplicate launches. A successful new launch reports the effective isolation setting. Results for an AppHost that was already starting or running omit that setting because the tool didn’t create a new process.
Stop coordinates the editor’s matching Aspire debug session when one exists; otherwise, it uses aspire stop --apphost for the resolved AppHost. It doesn’t mean “stop every Aspire process.”
Language model tool reference
Section titled “Language model tool reference”The tools in this reference return a JSON result with tool, success, and outcome fields. Besides the outcomes listed for each tool, each of these tools can report workspaceNotTrusted, invalidInput, cancellation, or a failure. Expand a tool to see its inputs and main outcomes.
aspire_resource_debug (extension v1.25.0 or later)
| Input | Required | Description |
|---|---|---|
appHostPath | Yes | The workspace-relative path of a discovered AppHost. |
resourceName | Yes | The name of the resource to attach to. |
strategy | No | auto (default) or attach. Both attach to the running resource. |
The confirmation names the resource and the AppHost, and it’s bound to the AppHost that was resolved when you approved it. If the path points to a different AppHost before the debugger attaches, the tool refuses the operation. Retry after discovery finds the intended AppHost, and confirm again.
| Outcome | Meaning |
|---|---|
started | The debugger attached. provider is dotnet or go. |
alreadyDebugging | A debugger is already attached to the resource. No new session starts. |
resourceNotRunning | The resource isn’t running. The tool never starts or restarts a resource. |
debuggerExtensionMissing | A required debugger extension is missing or disabled. debuggerExtensions lists each extension’s id and label. Install or enable it, and then retry. |
unsupportedResource | The resource isn’t a .NET project or Go resource that Aspire can attach to. |
resourceNotFound | The AppHost has no resource with that name. |
appHostNotFound | The AppHost isn’t running, or Aspire can’t match it to exactly one running AppHost. |
unknownAppHost, ambiguousAppHost | appHostPath doesn’t match exactly one discovered AppHost. |
error | The attach failed. errorKind identifies the failing step, such as debuggerStartDeclined or debuggerStartFailed. |
After installing or enabling a missing debugger extension, the AppHost doesn’t need to restart. For attach requirements and limitations, see Attach a debugger to a running resource.
aspire_debug_session_status
| Input | Required | Description |
|---|---|---|
appHostPath | Yes | The workspace-relative path of a discovered AppHost. |
resourceName | No | A resource to report on. When omitted, the tool reports on the AppHost. |
| Outcome | Meaning |
|---|---|
running, starting, stopping | The state of the AppHost, or of the editor session that runs the resource. |
notDebugging | The AppHost isn’t running, or no editor session runs the resource. |
multipleSessions | More than one editor session matches. |
resourceNotFound, resourceAmbiguous | The resource name matches no resource, or more than one. |
The result’s controller is editor when this VS Code window runs the AppHost, or external when it runs elsewhere, such as from aspire start. mode is run, debug, or other. Resource results also include the resource’s type, state, health, exit code, and source.
aspire_list_debug_sessions
This tool has no inputs. It returns sessionsFound with the appHost, state, mode, and controller of each AppHost that this VS Code window runs, or noSessions when there are none. The list includes up to 20 AppHosts. When more are active, the result includes truncated: true.
aspire_explain_launch_failure
The only input is the required appHostPath.
The extension keeps only the latest launch failure for each AppHost, in memory, for 30 minutes. It stores a sanitized summary instead of raw output. A failureFound result includes:
stage: where the launch failed. The value isdiscovery,validation,cliLaunch,build,dcpStartup,debugSession, ordashboard.category: the kind of failure, such asbuildFailed,missingDependency,cliUnavailable,portConflict,permissionDenied, ortimeout.recommendedActions: fixed actions for the category, such asfixBuildErrors,checkDependencies,installAspireCli,freeRequiredPort,checkPermissions,retryLaunch, orcheckAspireOutput.controller,mode, andexitCodeBucket, which isnone,zero,one,signal, orother.
The outcome is noRecordedFailure when no failure is recorded for the AppHost. The tool never returns compiler errors, logs, or other raw output. To read them, open the Output panel on the Aspire Extension channel and check the CLI logs.
aspire_hot_reload_status
| Input | Required | Description |
|---|---|---|
resourceName | No | The resource to check. When omitted, the tool answers only if exactly one resource runs in an editor session. |
appHostPath | No | The AppHost to check. When omitted, the tool checks every AppHost that this VS Code window runs. Use it to disambiguate a resource name. |
The result separates two questions:
hotReloadEnabledistruewhen C# Dev Kit is installed and its Hot Reload setting,csharp.experimental.debug.hotReload, is enabled. Enabled doesn’t mean that Hot Reload can reach the resource.outcomeisapplicableonly when Hot Reload is enabled and the resource is a .NET project resource that this VS Code window launched under the debugger, after the debug session has started. Resources started with Run Without Debugging and resources in other languages reportnotApplicable.
The evidence field explains the answer. The fallback field is always restartResource and then rebuildAndRestartAppHost: if an edit doesn’t take effect, restart the resource first, and rebuild and restart the AppHost only if that doesn’t help. The tool only reports. It never applies or verifies an edit.
Other outcomes:
| Outcome | Meaning |
|---|---|
noEditorControlledResource | No editor session runs a resource in scope, or appHostPath names an AppHost that runs outside this VS Code window. |
appHostNotRunning | The AppHost named by appHostPath isn’t running. |
resourceNotFound, resourceAmbiguous | The resource name matches no resource, or more than one. Supply appHostPath to disambiguate. |
tooManyActiveAppHosts | Too many AppHosts are active to check them all. Supply appHostPath. |
aspire_open_dashboard
The only input is the required appHostPath. The tool doesn’t ask for confirmation.
The tool opens the dashboard only for a running AppHost that this VS Code window started. It uses the dashboardBrowser value from the launch configuration or the Aspire: Dashboard Browser setting (aspire.dashboardBrowser). When neither selects a browser, the dashboard opens in your external browser. An opened result reports the presentation that was used. The tool never returns the dashboard URL, because the URL contains a login token.
Other outcomes include dashboardUnavailable and appHostNotRunning.
aspire_open_output
This tool has no inputs. After you confirm, it opens the Output panel on the Aspire Extension channel and returns opened. It doesn’t read the channel or return its contents.
Live editor integration
Section titled “Live editor integration”When an AppHost is running, the extension paints live state directly into your editor.
CodeLens appears above each resource definition in C#, TypeScript, and Go AppHosts. It shows the current state and health and exposes one-click Start, Stop, Restart, and View Logs actions in addition to any custom commands the resource publishes.
Editor title bar buttons add Run Aspire AppHost and Debug Aspire AppHost actions next to the standard Run/Debug buttons whenever you have an AppHost file open.
Health-aware gutter decorations provide an at-a-glance view of resource health and state without cluttering the editor with text.

The Aspire view
Section titled “The Aspire view”Aspire registers an AppHost view to VS Code. Workspace mode shows the AppHost in your current workspace; toggle to Global in the view header to manage every running AppHost on your machine.
Each resource shows its type, state, health summary, and exit code, plus a health-aware icon and a markdown tooltip listing endpoint URLs. Resources with health checks expose an expandable Health Checks group; use Expand all on the AppHost item to open everything at once. You can right-click a resource to start, stop, or restart it, view its logs, run resource-specific commands, open the dashboard, open the resource’s source with Open resource source (for resources backed by a source file or project), or open an interactive terminal session (for resources configured with WithTerminal()). Running .NET project and Go resources also show Attach debugger. For details, see Attach a debugger to a running resource.
Expand an idle AppHost or open its right-click menu to select Deploy AppHost, Publish AppHost, Run pipeline step, or Debug pipeline step. The pipeline actions prompt you to choose a step. Wait for the operation to finish before starting another for the same AppHost. For launch configuration options, see Run, debug, and deploy.
Run, debug, and deploy
Section titled “Run, debug, and deploy”Aspire: Configure launch.json file adds a minimal launch configuration .vscode/launch.json that supports AppHosts written in any language. AppHosts are discovered automatically in the workspace.
Go AppHosts (apphost.go) run and debug the same way, using the Go extension’s Delve debugger. If the Go extension isn’t installed or is disabled when you start debugging, the Aspire extension prompts you to set up Go debugging instead of starting the AppHost. Select Set Up to install the required extension, or use Run Without Debugging to start the AppHost without a debugger. Java and Rust AppHosts use the same prompt when their debugger extensions are missing.
The debugger uses the Go toolchain selected by the Go extension’s settings, such as go.goroot and go.alternateTools, while the Aspire CLI uses the go command on its PATH. If you have more than one Go installation, keep these selections aligned.
To launch a specific AppHost, configure an aspire.config.json with an appHost.path property.
{ "type": "aspire", "request": "launch", "name": "Aspire: Launch AppHost", "program": "${workspaceFolder}"}Four launch commands are supported:
runruns the AppHost (default if command is omitted).deploypushes to deployment targets defined in your AppHost.publishgenerates deployment artifacts like Kubernetes manifests or Bicep files without pushing to targets.doruns a specific pipeline step defined in your AppHost’s deployment pipeline — setstepto the name of the step you want to run.
All of these commands are debuggable; you can step into custom publishers and deployment steps just like application code.

The debuggers property forwards configuration to specific debuggers. Recognized keys are: apphost, project (C#/.NET), node, python, browser, azure-functions, and azure-functions-node.
For TypeScript or JavaScript Azure Functions apps, use the azure-functions-node key in .vscode/launch.json to customize the Node debugger, rather than node.
For project, the extension normally generates a serverReadyAction from the project’s launchSettings.json to automatically open the browser when the server is ready. Set debuggers.project.serverReadyAction explicitly to override this generated default with your own action and pattern:
{ "debuggers": { "project": { "serverReadyAction": { "action": "openIntegratedBrowser", "pattern": "\\bNow listening on:\\s+(https?://\\S+)" } } }}Finally, you can specify env and args to set environment variables and command-line arguments for the AppHost process.
{ "type": "aspire", "request": "launch", "name": "Aspire: Deploy AppHost", "program": "${workspaceFolder}", "command": "deploy", "env": { "MY_ENV_VAR": "value" }, "args": [ "--hello", "world" ], "debuggers": { "apphost": { "stopAtEntry": true }, "project": { "console": "integratedTerminal" }, "node": { "skipFiles": ["<node_internals>/**"] }, "python": { "justMyCode": false } }}For more information, see Aspire publishing and deployment overview.
Attach a debugger to a running resource
Section titled “Attach a debugger to a running resource”You can attach the VS Code debugger to a .NET project or Go resource that’s already running. Attaching requires Aspire extension v1.25.0 or later and a trusted workspace.
Attach works for resources that run without a debugger. That includes resources started with Run Without Debugging in VS Code and resources in an AppHost started from the CLI, such as with aspire start.
Install the debugger extension for the resource’s language first:
- .NET project resources need the C# extension (
ms-dotnettools.csharp). C# Dev Kit installs it for you. - Go resources need the Go extension (
golang.go) and Delve. They also need the Aspire 17.0 Go hosting integration. For build flag guidance, see Attach to a running Go resource.
To attach a debugger:
- In the Aspire view, expand the running AppHost.
- Right-click a running .NET project or Go resource and select Attach debugger.
- Wait for the Attaching debugger progress notification to finish. To stop attaching, select Cancel on the notification.
- Set breakpoints and debug as usual. To detach, select Disconnect on the debug toolbar.
The debugger attaches to the application process, not to the dotnet run, dotnet watch, or go run process that launched it. Attaching and detaching don’t restart the resource or the AppHost, and attach never starts a resource that isn’t running. If a debugger is already attached to the resource, VS Code reports that and doesn’t start another session.
If the required debugger extension is missing or disabled, VS Code shows a notification with an Open Extensions action. Install or enable the extension, and then select Attach debugger again. The AppHost doesn’t need to restart.
Coding agents can attach the same way with the aspire_resource_debug tool (#aspireDebugResource). For its inputs and outcomes, see the language model tool reference.
Attach has these limitations:
- You can’t attach to a .NET resource launched by
dotnet watchwhen arguments follow its first--. SDK versions interpret that separator differently, so Aspire declines instead of guessing which build output is running. The resource keeps running, anddotnet runlaunches aren’t affected. - Go resources configured with
WithDelveServerdon’t offer Attach debugger. Connect your debugger to the headless Delve server instead. - Coding agents can’t detach a debugger because there’s no detach tool. Detach from the debug toolbar instead. For the feature request, see microsoft/aspire#22154.
Language coverage
Section titled “Language coverage”The extension detects each resource’s language and attaches the right debugger:
| Language | Debugger | Required VS Code extension |
|---|---|---|
| Node.js / Browser apps | js-debug | None (built into VS Code) |
| Python | debugpy | Python |
| Java | java | Language Support for Java and Debugger for Java |
| Go | go (Delve) | Go |
| C# / .NET | coreclr | C# Dev Kit (recommended) or C# |
| Azure Functions, C# / .NET | coreclr | Azure Functions plus C# |
| Azure Functions, JavaScript / TypeScript | js-debug | None (built into VS Code) |
For TypeScript or JavaScript Azure Functions apps, the Aspire extension reserves a loopback Node inspector port until task launch, starts Azure Functions Core Tools as a task, and attaches VS Code’s built-in pwa-node debugger. Stopping the Aspire debug session also stops the Functions task. The Azure Functions VS Code extension isn’t required for these apps.
To attach the debugger to a .NET project or Go resource that’s already running, see Attach a debugger to a running resource.
Feedback and issues
Section titled “Feedback and issues”Found a bug or have an idea? File it on the microsoft/aspire repo: