-
Couldn't load subscription status.
- Fork 713
Add proper launch profile support to the VS Code extension #11573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add proper launch profile support to the VS Code extension #11573
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 11573Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 11573" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements proper launch profile support for the VS Code extension according to the DCP specification. The extension now correctly handles launch profiles from launchSettings.json files when debugging .NET projects, including environment variable merging, command line arguments, working directories, and browser launch settings.
Key Changes
- Added comprehensive launch profile parsing and merging logic
- Refactored the .NET debugger extension to support launch profile configuration
- Added test projects with sample launch profiles for manual verification
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
playground/Stress/Stress.Empty/Properties/launchSettings.json |
Added sample launch profiles for testing launch profile functionality |
playground/Stress/Stress.AppHost/Program.cs |
Updated to use launch profiles and demonstrate environment variable overriding |
extension/src/test/launchProfiles.test.ts |
Comprehensive unit tests for launch profile parsing and merging functions |
extension/src/test/dotnetDebugger.test.ts |
Unit tests for the .NET debugger extension with launch profile integration |
extension/src/debugger/launchProfiles.ts |
Core implementation of launch profile parsing, merging, and configuration logic |
extension/src/debugger/languages/dotnet.ts |
Refactored .NET debugger to integrate launch profile support and extract services |
extension/src/debugger/debuggerExtensions.ts |
Updated interface to support optional args parameter |
extension/src/debugger/AspireDebugConfigurationProvider.ts |
Enhanced debug configuration resolution with better defaults |
extension/.gitignore |
Added VS Code test directory to gitignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks great. I particularly like the new test coverage that this PR brings.
I have some questions/suggestions. Some apply to code that was already here before, but this is first time I am looking at it, so bear with me.
|
/backport to release/9.5 |
|
Started backporting to release/9.5: https://github.com/dotnet/aspire/actions/runs/17960064421 |
|
@adamint backporting to "release/9.5" failed, the patch most likely resulted in conflicts: $ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: add vscode-test to gitignore
Applying: change line endings
Applying: update dotnet debugger extension
Applying: fully support launch profiles
Applying: add test profiles to Stress.Empty for manual launch profile support tests
Applying: also validate or provide defaults for launch config on vs code side
Applying: don't parse command line args, apply suggestions
Using index info to reconstruct a base tree...
M extension/src/loc/strings.ts
Falling back to patching base and 3-way merge...
Auto-merging extension/src/loc/strings.ts
CONFLICT (content): Merge conflict in extension/src/loc/strings.ts
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0007 don't parse command line args, apply suggestions
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
* add vscode-test to gitignore * change line endings * update dotnet debugger extension * fully support launch profiles * add test profiles to Stress.Empty for manual launch profile support tests * also validate or provide defaults for launch config on vs code side * don't parse command line args, apply suggestions
…sion (#11617) * Initial plan * Add proper launch profile support to the VS Code extension (#11573) * add vscode-test to gitignore * change line endings * update dotnet debugger extension * fully support launch profiles * add test profiles to Stress.Empty for manual launch profile support tests * also validate or provide defaults for launch config on vs code side * don't parse command line args, apply suggestions --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Adam Ratzman <adam@adamratzman.com>
Description
My initial IDE protocol implementation in the vs code extension did not handle launch profiles properly. This PR handles launch profiles and working directories according to the DCP spec.
I have also added two profiles to the
playground/Stress.Emptyproject that are helpful when manually verifying that it works (such as launch profile env overriding launchSettings.json entries)Checklist
<remarks />and<code />elements on your triple slash comments?doc-ideatemplatebreaking-changetemplatediagnostictemplate