VSCode автоматически запускает какой-нибудь инспектор отладки во встроенном терминале с момента обновления 1.47.0. - PullRequest
3 голосов
/ 11 июля 2020

С момента вчерашнего обновления до 1.47.0, когда VSCode запускается, он дает мне следующий вывод в терминале (без последующего запроса, который позволил бы мне ввести):

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

В противном случае обычная процедура заключалась в следующем: Терминал VSCode (bash), набрав npm run serve (package. json has "serve": "vue-cli-service serve").

Однако я, очевидно, не могу сделать это сейчас, когда постоянно есть отладчик и инспектор Бег? Вот скриншот, показывающий мой пустой launch.json и терминал:

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. Затем я запустил npm run serve, и произошло следующее: 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: новое окно

1 Ответ

2 голосов
/ 12 июля 2020

Я решил это, запустив проект из WSL с code --disable-extensions . и проигнорировав последующие сообщения об ошибках. Затем я выключил VSCode и запустил его в обычном режиме с code ., и он снова начал нормально работать, как и раньше. Понятия не имею, почему это сработало. Я также разместил проблему на официальном GitHub VSCode , где кто-то ответил:

Вы можете исправить это на данный момент, установив debug.node.autoAttach на disabled, а затем перезагрузив окно / повторное открытие терминала.

Надеюсь, это кому-то поможет.

...