Solve “Breakpoint ignored” with Visual Studio code (vscode 1.19+) Chrome debugger
In case you are trying to use parcel bundler or any code transformer using the Visual Studio Code (vscode) Chrome Debugger and get
Breakpoint ignored because generated code not found (source map problem?).
You’ll have to make sure that your generated source map points to the correct file paths.
In your launch.js
webRootto specify your source folder
- Override the source map location on disk with
Breakpoints may still not trigger on initial load.
When you start the debugger which launches Chrome, there is a lag before vscode can attach to Chrome. Any code with breakpoints executed before vscode could attach, will not trigger the breakpoint.
To solve this, either restart the debugger after it has initially loaded (keep Chrome open).
Or you could use
- use .scripts command in Debug console to see the loaded scripts. Make sure the paths of the scripts is correct.
2. Open source map file and look how the path to the files have been specified.
trace: "verbose" to diagnose further.