Skip to content

Since latest update I'm getting "It's taking a while to configure your breakpoints." message #142830

Closed

Description

@MarByteBeep

Issue Type: Bug

I have a Javascipt only application, with no transpiling or conversion going on. My launch.json is like this:

{
	"type": "node",
	"request": "launch",
	"name": "Fetch",
	"program": "${workspaceFolder}/exec.js",
	"args": ["fetch.js"],
	"outputCapture": "std",
	"skipFiles": [
		"${workspaceFolder}/node_modules/**/*.js",
		"${workspaceFolder}/lib/**/*.js",
		"<node_internals>/**/*.js"
	]
},

Exec.js is just a wrapper that executes a method in fetch.js.

Starting this program now sometimes takes a long time and I get the following warning:

It's taking a while to configure your breakpoints. You can speed this up by updating the 'outFiles' in your launch.json.

I only have a few breakpoints, nor was this causing a problem before the update. What's changed? And why am I advised to update outFiles while I'm only running a simple javascript script?

VS Code version: Code - Insiders 1.65.0-insider (82a8bec, 2022-02-10T05:16:36.093Z)
OS version: Windows_NT x64 10.0.19044
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz (8 x 2494)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 7.89GB (2.72GB free)
Process Argv --crash-reporter-id 82b0b2fc-aa31-4181-9863-56bf85ed5e36
Screen Reader no
VM 0%
Extensions: none
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30422396
pythontb:30258533
pythonvspyt551:30291412
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscod805cf:30301675
pythonvspyt200:30323110
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30404738
wslgetstartedc:30421358
vsclayoutctrt:30405800
dsvsc008:30436272
pythonvspyt640:30426300
vsbas813:30436447
vscscmwlcmc:30428972
azactmsal:30432848

Activity

  1. maowenzhang commented on Feb 11, 2022

    @maowenzhang

    We met same issue at VSCode 1.64.2, it becomes super slow to get debug started. Tried a workaround is adding outFiles in the launch.json config.
    Also tried go back to old VSCode 1.63.2, which doesn't have this issue.

  2. added
    debug
    on Feb 11, 2022
  3. connor4312 commented on Feb 11, 2022

    @connor4312
    Member

    /jsDebugLogs

  4. vscode-triage-bot commented on Feb 11, 2022

    @vscode-triage-bot

    Please collect trace logs using the following instructions:

    If you're able to, add "trace": true to your launch.json and reproduce the issue. The location of the log file on your disk will be written to the Debug Console. Share that with us.

    ⚠️ This log file will not contain source code, but will contain file paths. You can drop it into https://microsoft.github.io/vscode-pwa-analyzer/index.html to see what it contains. If you'd rather not share the log publicly, you can email it to [email protected]

  5. added
    info-needed
    on Feb 11, 2022
  6. MarByteBeep commented on Feb 12, 2022

    @MarByteBeep
    Author

    I've sent the log to that mail address. I've tried parsing it using your online tool, and it seemed to work, but I couldn't see some sort of share button. If you need anything else, let me know!

  7. connor4312 commented on Feb 15, 2022

    @connor4312
    Member

    roblourens did something change in ripgrep in the last release? It looks like the time is all spent in findTextInFiles. The only change js-debug made is that where previously it would have searched with

    { include: new vscode.RelativePattern(workspaceFolder, '**/*.js'), exclude: '**/node_modules/**' }
    

    it now also includes an excluding explicitly using the workspace folder, like

    { include: new vscode.RelativePattern(workspaceFolder, '**/*.js'), exclude: `**/node_modules/**,${workspaceFolder}/**/node_modules/**` }
    
  8. cdaringe commented on Feb 15, 2022

    @cdaringe

    For the Javascript Debug Terminal, I'm not sure which attach configuration to plop trace into. Any advice--I'd like to do some profiling as well :)

  9. roblourens commented on Feb 16, 2022

    @roblourens
    Member

    No change to ripgrep or relevant search code that I can think of

  10. knaos commented on Feb 18, 2022

    @knaos

    I confirm our team has the same issue in the latest release.

  11. knaos commented on Feb 18, 2022

    @knaos

    Following the advice from issue #140427 to start VsCode with --disable-gpu flag fixes the problem.

    EDIT: This is NOT fixing the problem.

  12. connor4312 commented on Feb 18, 2022

    @connor4312
    Member

    That is quite surprising... can anyone else in the thread verify whether the same steps fix it for them?

  13. 16 remaining items

  14. AlCalzone commented on Feb 24, 2022

    @AlCalzone

    Andre Weinand (@weinand) I'm not seeing the original TS sources though when debugging this way. The breakpoints end up in some generated files which contain a sourcemap comment at the end. Note that there are no generated .js files on disk, because the .ts files are transpiled similar to how ts-node does it (except using esbuild which is faster).

    Edit: here's an example:
    grafik

    Edit 2: For reference, here's the same breakpoint in 1.63.2, without outFiles configured and without the debugger complaining that it takes long to resolve breakpoints:
    grafik

  15. connor4312 commented on Feb 24, 2022

    @connor4312
    Member
  16. AlCalzone commented on Feb 24, 2022

    @AlCalzone
    "outFiles": [],
    "resolveSourceMapLocations": null,

    does the trick 👍🏻

    Still weird that this used to work before, but now VSCode becomes unusable after debugging without this configuration. When the It's taking a while to configure your breakpoints. message is shown, debugging gets stuck and I have to restart VSCode to be able to use it again.

  17. connor4312 commented on Feb 24, 2022

    @connor4312
    Member

    I think it would be reasonable to automatically configure the config like that if we see the runtimeExecutable is ts-node or similar.

    A nicer way that would solve lots of problems is if the debugger could do a "test run" of the program to see how it's configured and then automatically update the launch.json appropriately... microsoft/vscode-js-debug#1214

  18. AlCalzone commented on Feb 24, 2022

    @AlCalzone

    automatically configure the config like that if we see the runtimeExecutable is ts-node or similar.

    I think this heuristic is going to be interesting. In my case, the runtime config is this:

    "runtimeExecutable": "yarn",
    "runtimeArgs": [
    	"node",
    	"--async-stack-traces",
    	"--inspect-brk=9229",
    	"-r",
    	"esbuild-register",
    	"${workspaceFolder}/test/run.ts"
    ],
  19. connor4312 commented on Feb 24, 2022

    @connor4312
    Member

    We could see flags like -r/--register pretty easily, and we already parse runtimeArgs for other reasons. But if you had a launch config which just runs something like npm run start or a custom shell script, we can't see that.

  20. meetgaurang commented on Mar 2, 2022

    @meetgaurang

    We are having a mono-repo project. Suggested solution to add "outFiles": [],"resolveSourceMapLocations": null, didn't work. This specific issue happens only with the VSCode version 1.64.2. The moment we switch back to previous version 1.63.2, the problem disappears. Our launch.json looks like this,

    {
      "version": "0.2.0",
      "configurations": [
        {
          "type": "node",
          "request": "launch",
          "name": "Launch Program",
          "skipFiles": [
            "<node_internals>/**"
          ],
          "program": "${file}",
          "outFiles": [],
          "resolveSourceMapLocations": null,
        }
      ]
    }
    
  21. connor4312 commented on Mar 2, 2022

    @connor4312
    Member

    Gaurang Patel (@meetgaurang) please collect trace logs using the instructions in the 2nd comment

  22. AlCalzone commented on Mar 3, 2022

    @AlCalzone

    Connor Peet (@connor4312) here's a trace where NO breakpoint is set:
    vscode-debugadapter-c18555ee.json.gz

    and here's the same situation but with an existing breakpoint, which took roughly 5 minutes to resolve:
    vscode-debugadapter-b587cb99.json.gz

  23. meetgaurang commented on Mar 7, 2022

    @meetgaurang

    I confirm that we no longer face this issue with the recent release - 1.65.0. It seems to be fixed.

  24. MarByteBeep commented on Mar 7, 2022

    @MarByteBeep
    Author

    Any idea what might have fixed it? I'll update and verify as well tomorrow.

  25. AlCalzone commented on Mar 14, 2022

    @AlCalzone

    Can confirm, 1.65.2 does work like 1.63.x

  26. jefersonlucio commented on Jun 7, 2022

    @jefersonlucio

    This issue started bugging me about 3 weeks ago, when I updated to 1.67.2 (OS Windows_NT x64 10.0.19044). Adding "--disable-gpu" to VSCode's shortcut icon solved it immediately.

  27. locked and limited conversation to collaborators on Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debuginfo-needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions