Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode tries (and fails) to attach debugger to npm scripts #102211

Closed
AntoineChwat opened this issue Jul 11, 2020 · 6 comments
Closed

VSCode tries (and fails) to attach debugger to npm scripts #102211

AntoineChwat opened this issue Jul 11, 2020 · 6 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)

Comments

@AntoineChwat
Copy link

Issue Type: Bug

I have a clean install of VSCode with WSL Remote (running WSL1, my Surface Book 3 still doesn't support Windows 2004). Whenever I try to run an npm script (through the npm script explorer or through the integrated terminal) the prompt says "debugger listening on ws://127.0.0.1:..." and then doesn't start anything. I tried disabling/enabling auto attach (which doesn't even show up in my status bar) but nothing works, it's still trying and failing to debug each and every npm script and I can't run anything. Interesting to note that it only started failing to attach the debugger after webpack crashed the integrated terminal when trying to run a Vue.js application on the step "95% emitting HtmlWebpackPlugin" (a command which runs perfectly well on the standard Ubuntu terminal).

VS Code version: Code 1.47.0 (d5e9aa0, 2020-07-09T08:02:06.629Z)
OS version: Windows_NT x64 10.0.18363
Remote OS version: Linux x64 4.4.0-18362-Microsoft

System Info
Item Value
CPUs Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz (8 x 1498)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.60GB (8.66GB free)
Process Argv
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 4.4.0-18362-Microsoft
CPUs Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz (8 x 1498)
Memory (System) 15.60GB (8.66GB free)
VM 0%
Extensions (5)
Extension Author (truncated) Version
vscode-eslint dba 2.1.6
mongodb-vscode mon 0.0.4
python ms- 2020.6.91350
vetur oct 0.24.0
remote-wsl ms- 0.44.4
@timrbula
Copy link

@AntoineChwat By disabling the auto attach, do you mean you set "debug.node.autoAttach": "off", in the settings.json? That fixed the issue for me

@AntoineChwat
Copy link
Author

Yep, that's exactly what I did. I tried to simply set it to "disabled" and then set to "off" completely everywhere (in user, remote and workspace) but it's still trying to attach to the debugger somehow

@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Jul 13, 2020
@weinand weinand removed their assignment Jul 13, 2020
@connor4312
Copy link
Member

connor4312 commented Jul 13, 2020

@AntoineChwat can you try the following:

  1. Run rm /tmp/node-cdp.*
  2. Reload the window
  3. Set debug.node.autoAttach to "on". Wait a moment. (note: make sure this applies to your workspace, since it sounds like you now have auto attach is multiple configs)
  4. Set debug.node.autoAttach to "disabled". Wait a moment.
  5. Open a terminal and see if you're in a good state

@AntoineChwat
Copy link
Author

Just tried it and it works, both from the integrated terminal and from the script explorer, thank you so much! It was driving me nuts not to be able to use any of these tools, thanks a lot

@connor4312
Copy link
Member

Ok, thanks for confirming. This duplicates #102057 (comment) then

/duplicate

@github-actions github-actions bot locked and limited conversation to collaborators Aug 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

5 participants
@weinand @connor4312 @timrbula @AntoineChwat and others