-
Notifications
You must be signed in to change notification settings - Fork 702
[release/9.5]: Add proper launch profile support to the VS Code extension #11617
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
[release/9.5]: Add proper launch profile support to the VS Code extension #11617
Conversation
* 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
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 11617 Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 11617" |
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 cherry-picks a commit that adds comprehensive launch profile support to the Aspire VS Code extension, allowing it to read and apply launchSettings.json
configurations during debugging. This brings the VS Code debugging experience in line with Visual Studio's native launch profile support.
Key Changes
- New launch profile parsing module that reads and applies
launchSettings.json
configurations - Enhanced debug configuration provider with launch profile-aware debugging capabilities
- Comprehensive test coverage for all launch profile functionality
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
playground/Stress/Stress.Empty/Properties/launchSettings.json |
Example launch settings file with two profiles for testing |
playground/Stress/Stress.AppHost/Program.cs |
Updated to demonstrate launch profile usage with project resources |
extension/src/test/launchProfiles.test.ts |
Comprehensive test suite for launch profile functionality |
extension/src/test/dotnetDebugger.test.ts |
Test suite for .NET debugger integration with launch profiles |
extension/src/loc/strings.ts |
Updated error message formatting with consistent punctuation |
extension/src/debugger/launchProfiles.ts |
Core module for reading and processing launch profile configurations |
extension/src/debugger/languages/dotnet.ts |
Refactored .NET debugger to integrate launch profile support |
extension/src/debugger/debuggerExtensions.ts |
Updated interface to support optional args parameter |
extension/src/debugger/AspireDebugConfigurationProvider.ts |
Enhanced debug configuration provider with better defaults |
extension/.gitignore |
Added VS Code test directory to ignore list |
interface ServerReadyAction { | ||
action: "openExternally"; | ||
pattern: "\\bNow listening on:\\s+https?://\\S+"; | ||
uriFormat: string; | ||
} |
Copilot
AI
Sep 25, 2025
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.
The interface defines hardcoded string literal types for action
and pattern
. Consider using constants or enums to make these values reusable and avoid magic strings.
Copilot uses AI. Check for mistakes.
action: "openExternally", | ||
pattern: "\\bNow listening on:\\s+https?://\\S+", | ||
uriFormat: applicationUrl | ||
}; |
Copilot
AI
Sep 25, 2025
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.
The hardcoded values for action
and pattern
are duplicated from the interface definition above. These should be extracted to constants to maintain consistency and avoid duplication.
Copilot uses AI. Check for mistakes.
This PR cherry-picks commit
2f7aedae1a6a5757827b4ae11ff466315929bba0
which adds comprehensive launch profile support to the Aspire VS Code extension.What's Changed
The VS Code extension now properly reads and applies
launchSettings.json
configurations when debugging .NET projects. This brings the VS Code debugging experience in line with Visual Studio's native launch profile support.Key Features Added
Launch Profile Integration
launchProfiles.ts
module that reads and parseslaunchSettings.json
filesEnhanced Debugging Experience
launchSettings.json
Developer Experience Improvements
Example Usage
With a
launchSettings.json
file like this:The VS Code extension will now automatically apply these settings when debugging, providing a consistent experience across different development environments.
Technical Details
extension/src/debugger/launchProfiles.ts
handles all launch profile operationsdotnetDebugger.test.ts
andlaunchProfiles.test.ts
for comprehensive testingThis enhancement significantly improves the .NET development experience in VS Code by bringing launch profile support that was previously only available in Visual Studio.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.