Skip to content
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

[SUGGESTION] Add the ability to choose which Browser to Launch on Debug AND enable choosing to close the browser on end of session #1723

Open
JohnGalt1717 opened this issue Jan 15, 2025 · 0 comments
Labels
area-dotnet-debugging Issues around .NET Debugging with console, ASP.NET, or Aspire enhancement New feature or request

Comments

@JohnGalt1717
Copy link

JohnGalt1717 commented Jan 15, 2025

Describe the feature you'd like

Please add the ability for this type of launch configuration to allow choosing the browser that launches like you can with Visual Studio. Right now you can ONLY use your default browser.

    {
      "name": "Debug C# Project",
      "type": "dotnet",
      "request": "launch",
      "projectPath": "${workspaceFolder}/AppHost/AppHost.csproj",
    }

And please make it so that we can opt to have it close the browser on debug session end like we can in Visual Studio.

Alternatives considered

Right now, debug using the old way against the dll and building with a task will allow you to launch the browser you want like Chrome (instead of your default) which is super useful. But this breaks the aspire dashboard because it prompts for a token every time which you have to copy out of the logs.

And obviously it would be preferable to use the above.

Here's what will work to run chrome, but doesn't work to get the aspire dashboard launched without token:

{
      "name": "C# Debug",
      "type": "coreclr",
      "request": "launch",
      "preLaunchTask": "build apphost",
      "program": "${workspaceFolder}/AppHost/bin/Debug/net9.0/AppHost.dll",
      "args": [],
      "cwd": "${workspaceFolder}",
      "stopAtEntry": false,
      "serverReadyAction": {
        "action": "debugWithChrome",
        "pattern": "Now listening on: (https?://\\S+)",
        "uriFormat": "%s"
      },
      "env": {
        "ASPNETCORE_ENVIRONMENT": "Development",
        "DOTNET_ENVIRONMENT": "Development",
        "ASPIRE_DASHBOARD_DEVELOPER_MODE": "true"
      }

Environment Information

Version: 1.96.3
Commit: 91fbdddc47bc9c09064bf7acf133d22631cbf083
Date: 2025-01-09T18:14:09.060Z
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.96.3 Chrome/128.0.6613.186 Electron/32.2.6 Safari/537.36
OS: Windows 11 24H2

@JohnGalt1717 JohnGalt1717 added the enhancement New feature or request label Jan 15, 2025
@JohnGalt1717 JohnGalt1717 changed the title [SUGGESTION] Add the ability to choose which Browser to Launch on Debug VS Code [SUGGESTION] Add the ability to choose which Browser to Launch on Debug AND enable choosing to close the browser on end of session Jan 15, 2025
@webreidi webreidi added the area-dotnet-debugging Issues around .NET Debugging with console, ASP.NET, or Aspire label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dotnet-debugging Issues around .NET Debugging with console, ASP.NET, or Aspire enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants