VS Code Debugger Extremely Slow to Reach First Breakpoint

Viewed 9034

I'm using VS Code on Windows 10, to debug both Python and React. The debugger is extremely slow to reach the first breakpoint, for both Python and JS/Chrome. The sequence of actions I'm observing is:

  1. VS Code's program tab lights up immediately

enter image description here

  1. The first breakpoint only gets reached/highlighed 10-60 seconds later. In between it hangs. I try to click anywhere on the screen but the application is frozen.

enter image description here

Extensions installed:

enter image description here

About:

enter image description here

3 Answers

It looks like I found something that speeds it up. If I grab and move the title bar of VS Studio, the breakpoint gets reached and highlighted.

This is a preliminary finding, I'll edit it if I find something else.

enter image description here

Here is how I solved similar issue, just for your reference.

  • Issue: When I try to debug node.js + angular application, the debugger takes very long time when starts node.js server before it reaches to the 1st breakpoint.
  • Reason: VS code scans all the JS files for a source map to typescript files.
  • Solution: In the launch.json configure "outFiles" to point to the JS files that you want to debug as .ts only.

Example:

{
    "type": "node",
    "request": "launch",
    "name": "Node",
    "program": "${workspaceRoot}/server/server.js",
    "cwd": "${workspaceRoot}",
    "runtimeArgs": ["--inspect-brk"],
    "runtimeExecutable": "node",
    "outFiles": [
        "${workspaceFolder}/server/lib/dist/*.js"
    ],
    "skipFiles": [
        "**/node_modules/**"
    ]
},
Related