4

I'm switching to VSCode WSL Remote mode for a JavaScript project. The Chrome Debugger Extension always look for Google Chrome in Linux. Is this the correct behavior?

I have a Chrome for Linux installed in WSL, which could run on X server. The problem is that the breakpoints are not working.

I've tried removing Chrome in WSL, the extension will then throw Can't find Chrome - install it or set the "runtimeExecutable" field in the launch config.

Should I set "runtimeExecutable" to chrome.exe or force it to run on local side with

"remote.extensionKind": {
    "msjsdiag.debugger-for-chrome": "ui",
}

Could I correct some config so that the Chrome Debugger can find the Chrome in Windows if there's no Linux install?

Is there any official guide for it?

Thanks!

zib
  • 101
  • 8

1 Answers1

1

Yes, you should set

"remote.extensionKind": {
"msjsdiag.debugger-for-chrome": "ui"}

An alternative would be to set an alias chrome to go to chrome.exe in Windows. To ensure persistence, add it to your ~.bashrc or shell equivalent or alternatively .profile.

Side note: you should be able to debug with the new chromium-based Edge as well if you prefer using that.

WSLUser
  • 601
  • 5
  • 10
  • Hi, can you share on how to create an alias `chrome` to call some exe windows? – Acy Jul 17 '21 at 05:29
  • 1
    ```alias chrome="\"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe\"" ```Change the path as needed. You can do similar for any other windows executable. – WSLUser Jul 27 '21 at 15:29