VSCodeTriageBot / testissues

Clone of the vscode issue stream.
36 stars 22 forks source link

Debug NPM Script hangs #48710

Open VSCodeTriageBot opened 3 days ago

VSCodeTriageBot commented 3 days ago

Type: Bug

When running the attached project using Debug NPM script, the first call to execSync doesn't seem to clean up properly and the second call hangs and is unable to be debugged. This only happens when the script is run from within VS Code. Running the script from the command prompt completes correctly.

Steps to reproduce:

  1. Run npm i to install dependencies
  2. From a command prompt, run npm run run. The script will complete correctly.
  3. Open the project in VS Code.
  4. Open the command pallette, and run Debug: Debug NPM script.

Expected results:

When running in VS Code, both calls to execSync should complete correctly.

Actual results:

The first call to execSync returns after completion, but there is still another process, displayed as Node.js Process 2 in the Call Stack window. This process doesn't have any debug controls. The only option is to disconnect. The second call to execSync is then attempted but doesn't seem to do anything. In the terminal, done format is printed and then there is no more displayed. If you press CTRL-C in the terminal window, the Process 2 process ends, but the main process is still active, even though you are returned to the command prompt.

VS Code version: Code 1.90.2 (5437499feb04f7a586f677b155b039bc2b3669eb, 2024-06-18T22:34:26.404Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-7700K CPU - 4.20GHz (8 x 4200)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.93GB (6.68GB free)| |Process Argv|--crash-reporter-id 2825093d-42ce-4844-9043-fb109aceb08c| |Screen Reader|no| |VM|0%|
Extensions (4) Extension|Author (truncated)|Version ---|---|--- vscode-eslint|dba|3.0.10 prettier-vscode|esb|10.4.0 vscode-react-native|msj|1.13.0 prisma|Pri|5.16.1
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscoreces:30445986 vscod805:30301674 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonnoceb:30805159 asynctok:30898717 pythonregdiag2:30936856 pythonmypyd1:30879173 2e7ec940:31000449 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 jchc7451:31067544 chatpanelc:31048052 dsvsc021:30996838 bdiig495:31013172 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 dwnewjupyter:31046869 legacy_priority:31082724 ```