microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.35k stars 28.6k forks source link

Extremely slow debugging Node JS if any breakpoint exists, after upgrading to 1.6.4 #142942

Closed h5nc closed 2 years ago

h5nc commented 2 years ago

Issue Type: Bug

Steps

  1. Create a new folder and open it with VSCode
  2. Create a new test.js file and type in console.log("Hello")
  3. Go debug section from the left panel and create a launch.json file, selecting Node.JS
  4. Add a breakpoint to any line of code and hit Start Debugging.

This will take more than 2 minutes to make the code running. Meanwhile there pops a window says

it's taking a while to configure your breakpoints. you can speed this up by updating the 'outfiles' in your launch.json

However this doesn't help at all.

If there is no breakpoint at all it will run immediately with the expecting result. If I downgrade to 1.6.3 without changing anything, breakpoint won't cause any delay at all. Then I tried upgrade to 1.6.4 and the problem occurs. Then I tried upgrade to pre-release version and still this causes problems.

Tried reinstall all extensions, disable them, upgrade NodeJS. None of them help with VSCode 1.6.4.

launch.json file is automatically generated as

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "pwa-node",
            "request": "launch",
            "name": "Launch Program",
            "skipFiles": [
                "<node_internals>/**"
            ],
            "program": "${workspaceFolder}/test.js",
            "console": "integratedTerminal"
        }
    ]
}

Here Mac OS 12.0.1 probablly the newest. Node version is 17.4.0. Now I am fine with 1.6.3 but I do hope this can be fixed.

VS Code version: Code 1.63.2 (Universal) (899d46d82c4c95423fb7e10e68eba52050e30ba3, 2021-12-15T09:37:28.172Z) OS version: Darwin x64 21.1.0 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz (8 x 4200)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|9, 5, 4| |Memory (System)|32.00GB (11.81GB free)| |Process Argv|--crash-reporter-id 2fa68aa5-c6c7-44bb-9614-1e7d00298179| |Screen Reader|no| |VM|0%|
Extensions (13) Extension|Author (truncated)|Version ---|---|--- lua-debug|act|1.53.0 vscode-combine-scripts|Bat|2.0.5 toggle-format-on-save|cbr|0.2.0 vscode-eslint|dba|2.2.3 prettier-vscode|esb|9.2.0 applescript|idl|0.21.1 vscode-nuget-package-manager|jmr|1.1.6 Lua|key|0.0.9 csharp|ms-|1.24.0 python|ms-|2022.0.1814523869 vscode-pylance|ms-|2022.2.1 vscode-lua|tri|0.12.4 unity-debug|Uni|3.0.2
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 pythonvspyl392cf:30425750 pythontb:30283811 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 pythondataviewer:30285071 vscod805cf:30301675 pythonvspyt200:30340761 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 vsc1dst:30433059 pythonvs932:30410667 wslgetstarted:30433507 vsclayoutctrc:30437038 vsrem710:30416614 vsbas813:30436447 vscscmwlcmc:30436992 ```
connor4312 commented 2 years ago

Duplicates https://github.com/microsoft/vscode/issues/142830