Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>AspireNew to Visual Studio Code? Get it now.
Aspire

Aspire

Microsoft

microsoft.com
|
34,326 installs
| (2) | Free
Official Aspire extension for Visual Studio Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Aspire for Visual Studio Code

The official Aspire extension for VS Code. Run, debug, and deploy your Aspire apps without leaving the editor, with debugging support for C#, Python, Node.js, Go, and more.

Aspire helps you build distributed apps — microservices, databases, containers, frontends, and any complex application topology — by providing declarative APIs to wire your resources together in code.


Getting Started

Open your Aspire project in VS Code, or create one with Aspire: New Aspire project from the Command Palette. Run Aspire: Configure launch.json file to set up the debug configuration, then press F5. The Aspire extension will build your apphost, start your services, attach debuggers, and print the dashboard URL. Open the dashboard from the Aspire panel when you need it, or opt into auto-launch with the aspire.dashboardBrowser setting.

There's also a built-in walkthrough at Help → Get Started → Get started with Aspire that covers the basics step by step.

The core flow is:

  1. Open an Aspire repo or create a starter with Aspire: New Aspire project.
  2. Let the Aspire view discover the AppHost.
  3. Press F5, or use Run Aspire apphost / Debug Aspire apphost from the editor.
  4. Inspect resources in the Aspire view and open the dashboard when you need logs, traces, metrics, or endpoint URLs.

Learn more in the Aspire VS Code extension documentation.


Running and Debugging

Launch configuration

Add an entry to .vscode/launch.json pointing at your apphost:

{
    "type": "aspire",
    "request": "launch",
    "name": "Aspire: Launch TypeScript starter",
    "program": "${workspaceFolder}/AppHost/apphost.mts"
}

When you hit F5, the extension builds the apphost, starts all the resources (services, containers, databases) in the right order, hooks up debuggers based on each service's language, and prints the dashboard URL.

You can also right-click an AppHost file in the Explorer and pick Run Aspire apphost or Debug Aspire apphost.

VS Code running and debugging an Aspire AppHost with resource debug sessions.

Deploy, publish, and pipeline steps

The command property in the launch config lets you do more than just run:

  • deploy — push to your defined deployment targets.
  • publish — generate deployment artifacts (manifests, Bicep files, etc.).
  • do — run a specific pipeline step. Set step to the step name.
{
    "type": "aspire",
    "request": "launch",
    "name": "Aspire: Deploy TypeScript starter",
    "program": "${workspaceFolder}/AppHost/apphost.mts",
    "command": "deploy"
}

Customizing debugger settings per language

The debuggers property lets you pass debug config specific to a language. Use project for C#/.NET services, python for Python, and apphost for the apphost itself:

{
    "type": "aspire",
    "request": "launch",
    "name": "Aspire: Launch MyAppHost",
    "program": "${workspaceFolder}/MyAppHost/MyAppHost.csproj",
    "debuggers": {
        "project": {
            "console": "integratedTerminal",
            "logging": { "moduleLoad": false }
        },
        "apphost": {
            "stopAtEntry": true
        }
    }
}

The Aspire Panel

The extension adds an Aspire panel to the Activity Bar. It shows a live tree of your resources. In Workspace mode you see resources from the apphost in your current workspace, updating in real time. Switch to Global mode with the toggle in the panel header to see every running apphost on your machine.

Right-click a resource to start, stop, or restart it, view its logs, run resource-specific commands, or open the dashboard.

Aspire view discovering a workspace AppHost and showing resources with live state.


The Aspire Dashboard

The dashboard gives you a live view of your running app — all your resources and their health, endpoint URLs, console logs from every service, structured logs (via OpenTelemetry), distributed traces across services, and metrics. By default, the dashboard URL is printed to the debug console when your app starts and stays available from the Aspire panel.

Aspire Dashboard showing running resources


Chat Tools for Agents

The extension contributes two Language Model tools so chat agents start and stop your apphost through the same lifecycle operations as the Aspire view:

When VS Code is active, agents should prefer these editor operations over running Aspire AppHost lifecycle commands in a terminal.

Tool Reference in chat What it does
aspire_apphost_start #aspireStartAppHost Starts an apphost Aspire already discovered in your workspace, in run (no debugger) or debug (debugger attached) mode
aspire_apphost_stop #aspireStopAppHost Stops a running apphost Aspire discovered in this workspace

Both tools take the workspace-relative path of an apphost Aspire has already discovered — the same list the Aspire view shows — and resolve it against that list rather than against your filesystem. An agent can only name an apphost Aspire found, so it cannot point these tools at an arbitrary file, and the path shown in the confirmation is that discovered apphost's own path rather than anything the agent supplied. Absolute paths are rejected; in a multi-root workspace, always prefix the path with the workspace folder name. Both tools ask a chat agent's user to confirm before doing anything, and only work in a trusted workspace. They never pick an apphost for you: a path that names no discovered apphost, or more than one, fails and reports back the apphosts you can name. Starting an apphost that is already starting or running does not launch a second one. Stopping an editor-created apphost coordinates its Aspire debug session; stopping an apphost started from a terminal delegates to aspire stop --apphost for the same discovered path. The extension does not kill arbitrary processes. If it cannot determine which apphosts exist or whether the selected apphost is running, the call reports a failure rather than claiming nothing is there.


Language and Debugger Support

The extension figures out what language each resource uses and attaches the right debugger. Some languages need a companion extension:

Language Debugger Extension needed
C# / .NET coreclr C# Dev Kit or C#
Python debugpy Python
Node.js js-debug (built-in) None
Browser apps js-debug (built-in) None
Azure Functions varies by language Azure Functions + language extension

Feedback and Issues

Found a bug or have an idea? File it on the microsoft/aspire repo:

  • Report a bug
  • Request a feature

Contributing

See CONTRIBUTING.md for setup, project layout, the extension-only inner loop, and running tests. Good first issues are tagged area-vscode-extension + good first issue.

Learn more

  • Aspire docs
  • Integration gallery
  • Dashboard overview
  • Discord

License

See LICENSE.TXT for details.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft