VSCode automatically starts up some debugging inspector in the built-in terminal ever since 1.47.0 update

Viewed 988

Ever since the update yesterday to 1.47.0, when VSCode starts up, it gives me this output in the terminal (without a subsequent prompt which would allow me to type):

Debugger listening on ws://127.0.0.1:55430/f3f20387-0605-4a39-b807-77f02bea362f
For help, see: https://nodejs.org/en/docs/inspector

My otherwise usual procedure has been that I:

  1. Use WSL to navigate to the project directory I want to open, and the type code .
  2. I would then start up my server within the VSCode terminal (bash) by typing npm run serve (package.json has "serve": "vue-cli-service serve").

However, I obviously can't do this now that there's some debugger and inspector continuously running? Here's a screenshot showing my blank launch.json and the terminal:

debugger showing instead of command prompt

Can someone please tell me how to fix this? I have no idea what has gone wrong, but it only seems to happen with this particular project which I'm opening with code .


UPDATE

So I tried some more things.

  1. I ran cp -rf testsite testfrontend within WSL
  2. and then in the copied directory I deleted package-lock.json and node_modules
  3. I subsequently ran npm install
  4. I then started VSCode by running code . in the directory of the copied project within WSL

When vscode came up, the terminal wasn't showing. When I showed it (ctrl+`), the following lines ran automatically on their own:

vscode terminal startup

  1. Then I ran npm run serve, and the following happened: stuck

  2. And with this message in the Debugger Console tab: error

I should mention that I don't get this error or any of the other aforementioned issues when I run npm run serve directly from WSL. I also don't get the aforementioned issues if I click the green WSL: Ubuntu button at the bottom left and then choose Remote-WSL: New Window and then run npm run serve: new window

1 Answers

I ended up solving this by running the project from WSL with code --disable-extensions . and ignoring the subsequent error messages. I then shutdown VSCode and ran it normally with code ., and it started working normally again as it did in the past. No clue why this worked. I also posted the Issue on VSCode's official GitHub, where someone replied:

You can fix this for the moment by setting debug.node.autoAttach to disabled, then reloading the window / reopening the terminal.

Hope this helps someone.

Related