vscode-js-debug: Can't debug web (eg ReactJS project) by Microsoft Edge or Chrome

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.77.0
  • OS Version: WSL2 (on both Ubuntu 18.04 and Ubuntu 20.04)- Windows 11 build 22624.1470 Steps to Reproduce:
  1. Create a new ReactJS app (no code modified)
  2. Press F5 and choose Web(Edge) debug
  3. Error: Unable to lanuch brower: (void 0) is not a constructor

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 9
  • Comments: 36 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Same issue, VS Code Version: 1.77.0 + Dev Container (all rebuild) Started today

Same issue here, with non-React project. Windows 10, WSL2.

Reverting to VS Code 1.76.2 resolves the issue

I have the same issue, VS Code Version: 1.77.0 on WSL2 under Windows 10, fully updated. Started today, with the recent VS Code update.

Relevant: https://stackoverflow.com/questions/75894025/vs-code-debug-with-chrome-spitting-out-weird-error-after-no-change-unable-to-la

Ah, sorry, one more change is needed for now: add "browserLaunchLocation": "ui" to your launch config. I will put a fix in and make a special nightly release today for that.

This will be fixed in the nightly build available shortly after 5PM PST today. I will also propose it for a recovery release next week.

@Ashesh3 I tried without it and it does seem to work for me. I thought that may have been a possible fix but it seems like it has already been updated in the nightly build.

@adviner not sure entirely. one thing I did do was try installing chrome via the terminal using their debian package. it didn’t really seem to give a full success on install. and alas I am still faced with ‘unable to attach to browser’. other than that, I think all I did was reinstall the 'Javascript Debugger (nightly)" extension and relaunch vscode a few times.

I tried the nightly build, however I am getting ‘unable to attach to browser’