[release/13.2] Fix 13.2 IDE execution regressions for Azure Functions and class library projects#15741
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15741Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15741" |
There was a problem hiding this comment.
Pull request overview
Backport that restores IDE execution behavior for project resources in Aspire 13.2 debug sessions (notably Azure Functions and class-library-based AWS Lambda scenarios) and updates the VS Code extension to support Executable launch profiles.
Changes:
- Adds a debug-session fallback in
DcpExecutor.PrepareProjectExecutables()to ensure IDE execution is configured even whenSupportsDebuggingAnnotationis missing orDEBUG_SESSION_INFOisn’t provided. - Adjusts
SupportsDebuggingevaluation so"project"launch support is treated as implicit during debug sessions. - Extends the VS Code extension to honor
commandName: "Executable"launch profiles by usingexecutablePathas the debug program and adds a regression test.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/Aspire.Hosting.Tests/Dcp/DcpExecutorTests.cs | Adds/updates coverage for debug-session IDE execution fallback behavior (but currently contains a merge conflict). |
| src/Aspire.Hosting/Utils/ExtensionUtils.cs | Treats "project" launch support as implicitly supported in debug sessions; custom types still require explicit advertisement. |
| src/Aspire.Hosting/Dcp/DcpExecutor.cs | Implements IDE execution fallback logic and factors ProjectLaunchConfiguration construction into a helper. |
| extension/src/debugger/launchProfiles.ts | Adds a command-name constant and makes Project profile detection case-insensitive. |
| extension/src/debugger/languages/dotnet.ts | Adds handling for Executable launch profiles (e.g., AWS Lambda) by launching the specified executable and still building the project. |
| extension/src/test/dotnetDebugger.test.ts | Adds a test validating Executable launch profile behavior (program/args/cwd/env + build). |
| <<<<<<< ours | ||
| ======= | ||
| // Verifies that environment value callbacks are invoked only once per container startup. |
There was a problem hiding this comment.
The file contains unresolved Git merge conflict markers (e.g., <<<<<<< ours, =======, >>>>>>> theirs). This will not compile and also risks silently dropping/duplicating tests. Resolve the conflict by choosing the intended test block(s) and removing the conflict markers.
Backport of #15714 to release/13.2
/cc @adamint
Customer Impact
Project resources using custom debug types (Azure Functions, AWS Lambda class libraries) or added via
AddResourcewithoutWithDebugSupportno longer received IDE execution in Visual Studio or VS Code after upgrading to Aspire 13.2, breaking debugging and symbol loading.This PR fixes regressions in
DcpExecutor.PrepareProjectExecutables()by adding a fallback branch that provides IDE execution with a standardProjectLaunchConfigurationwhen in a debug session but either noSupportsDebuggingAnnotationexists (e.g.AddResource-basedProjectResourcesubclasses) or the IDE did not sendDEBUG_SESSION_INFO(Visual Studio scenario where VS handles all project types natively). This restores pre-13.2 behavior.In the VS Code extension, adds support for
Executablecommand launch profiles used by AWS Lambda. When the launch profile specifiescommandName: "Executable"with anexecutablePath, the extension builds the project and uses the profile's executable path as the debug program instead of the project output DLL.Fixes #15606
Fixes #15647
Fixes #15378
Fixes #15699
Testing
Unit tests + manual E2E validation with standard, custom-debug, Azure Functions, and class library project types.
Risk
Low-Medium. Changes are scoped to debug session setup and VS Code extension launch profile handling.
Regression?
Yes