Repository navigation
Fix Visual Studio debugging for Azure Functions projects - #22346
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 22346Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 22346" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟡 Changes recommended
The fallback can bypass the Functions host in some extension-owned or detached sessions and drop --useHttps when adding a port, leaving an HTTPS endpoint backed by HTTP.
2 open issues
What changed in this PR
Adds an Azure Functions-specific compatibility route to Aspire’s launch policy so Visual Studio can own project debugging and load breakpoint symbols.
Changes:
- Allow native
projectlaunch when advertised and no Aspire extension endpoint is configured. - Add routing tests for the Visual Studio fallback, missing project support, and unrelated custom launch types.
- Clarify the test comment describing capability-less IDE sessions.
| File | Description |
|---|---|
| tests/Aspire.Hosting.Tests/DebugSupportExtensionsTests.cs | Clarifies a comment about implicit legacy project support. |
| tests/Aspire.Hosting.Tests/Dcp/DcpExecutorTests.cs | Adds positive and negative launch-routing regression tests. |
| src/Aspire.Hosting/Dcp/ExecutableLaunchPolicy.cs | Adds the gated Azure Functions native-project fallback. |
Review effort: Balanced
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
There was a problem hiding this comment.
🟡 Changes recommended
The fallback misclassifies extension-owned VS Code sessions without ASPIRE_EXTENSION_ENDPOINT, routing Azure Functions to the ordinary project debugger instead of process execution and potentially starting the worker without its Functions host.
3 open issues
Review effort: Max
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟡 Changes recommended
Launch-policy regressions drop required tool prefixes and Functions launch-profile arguments, while incorrect debug-support reporting for project overrides can cause callbacks to omit arguments needed for process execution.
3 open issues
3 resolved since last review
Review effort: Max
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>


Description
Visual Studio 2026 advertises native
projectlaunch support but not the VS Code-specificazure-functionslaunch type. Aspire previously treated that missing custom capability as an exact rejection and launched Azure Functions through DCP process execution, so Visual Studio did not own the Functions process and project breakpoints could not load symbols.This change uses the legacy
projectcompatibility launch only for Azure Functions projects when the IDE advertises native project support and the session is not owned by an Aspire extension. Extension-managed sessions continue to treat their advertised custom launch types as an exact contract.Regression coverage verifies the Visual Studio fallback, the VS Code process fallback, IDEs without project support, and unrelated custom launch types.
Validation:
DcpExecutorTests: 332 passed, 1 platform-specific test skipped.azure-functionslaunch type hit its breakpoint through the nativeprojectcompatibility launch.Fixes #22242
Checklist
<remarks />and<code />elements on your triple slash comments?