Skip to content

Fix Visual Studio debugging for Azure Functions projects - #22346

Merged
Karol Zadora-Przylecki (karolz-ms) merged 6 commits into
mainfrom
dev/karolz-ms/issue-22242
Nov 18, 2026
Merged

Karol Zadora-Przylecki (karolz-ms) merged 6 commits into
mainfrom
dev/karolz-ms/issue-22242

Conversation

@karolz-ms

@karolz-ms Karol Zadora-Przylecki (karolz-ms) commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

Visual Studio 2026 advertises native project launch support but not the VS Code-specific azure-functions launch 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 project compatibility 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:

  • Focused launch-routing tests: 6 passed.
  • DcpExecutorTests: 332 passed, 1 platform-specific test skipped.
  • Visual Studio 18.13 Insiders F5 check against this branch: a source-backed project using the unsupported azure-functions launch type hit its breakpoint through the native project compatibility launch.

Fixes #22242

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 22346

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 22346"

@github-actions github-actions Bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 16, 2026
@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot November 16, 2026 23:16
@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 project launch 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

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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>
@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

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>
@aspire-repo-bot
aspire-repo-bot Bot requested a max review from Copilot November 17, 2026 20:02
This was referenced Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VS2026 18.12.0 (Nov update) cannot hit breakpoint in Azure Functions project; symbol not loaded with Aspire 13.6.5 (yet again)

3 participants