microsoft / vscode-js-debug

A DAP-compatible JavaScript debugger. Used in VS Code, VS, + more
MIT License
1.67k stars 283 forks source link

No obvious way to launch Edge as debug browser for terminal link handling in WSL #2012

Closed amweiss closed 3 months ago

amweiss commented 6 months ago

Describe the bug When using the Debug Terminal with VSCode in WSL remote mode, there was no obvious way to switch the browser option to Edge. I was able to make it work by using the following config:

    "debug.javascript.defaultRuntimeExecutable": {
        "pwa-chrome": "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe",
    },

To Reproduce Steps to reproduce the behavior:

  1. In Windows, set Edge as your default browser
  2. Run VSCode in WSL mode
  3. Start a webserver
  4. Ctrl+click the advertised hostname
  5. See Chrome launches

VS Code Version: v2024.5.217

connor4312 commented 6 months ago

Can you please let me know the value of this registry key?

We will use Edge automatically if it's set as the platform default browser, but it seems like the detection is not working in your case.

amweiss commented 6 months ago

Here's the output of that command:

reg QUERY HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice /v ProgId

HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice
    ProgId    REG_SZ    MSEdgeHTM
amweiss commented 4 months ago

@connor4312 sorry for the tag, but I didn't want to start a new issue just to ask so I wanted to make sure it was seen on a closed issue.

Any chance of getting a release of vscode-js-debug-companion to make this work? I didn't see a nightly like the vscode-js-debug extension so I can't verify this or benefit from it yet.

alexr00 commented 4 months ago

I have Edge Dev set as my default browser, and this works fine from non-js-debug terminal, but not from a js-debug terminal.

connor4312 commented 3 months ago

@alexr00 can you share more details about the platform you're on? We don't detect Edge Dev in general on Windows. I think that's a separate issue if so.

alexr00 commented 3 months ago

My mistake, I thought this was for just using the default browser. I'm on Windows using WSL.

connor4312 commented 3 months ago

We don't naively launch the default browser because it might not be debuggable; we identify if it's Edge or (by default) Chrome and then launch that using our usual discovery.

Closing for some reverification