Unbound breakpoints in late loaded scripts
See original GitHub issueDescription I’m struggling to make breakpoints work in scripts that are loaded after the application started. My setup is the following:
The first component is an Electron application that is started using a node launch configuration (titled “Electron launcher”) to gain access to the main process. It is located in ${env:ProgramFiles}/FoundryVTT/resources/app
.
The second component is a module loaded by that application. It is located by the application from ${env:AppData}/../Local/FoundryVTT/Data/modules
, which I override to ${workspaceRoot}/src
using a path mapping. It is accessed using a chrome attach configuration titled “FoundryVTT”.
Issue: When setting a breakpoint in my module file “statuscounter.js” while it is loaded, it binds correctly. If I restart or reload the application, the breakpoint no longer binds.
There is also a second breakpoint in “foundry.js”, which is located in ${env:ProgramFiles}/FoundryVTT/resources/app/public
and is loaded at runtime by the Electron renderer process, which I also want to debug. This one is located using the web root and has the same issue.
Files Here are the logs for the renderer (b3a…) and launcher (f94…) processes: vscode-debugadapter-b3a3b767.json.gz vscode-debugadapter-f940b5b0.json.gz
They include both an unsuccessful bind at the start and a succesful one near the end (when I reset the breakpoint while everything is loaded), which have the same (correct) path.
This is the launch configuration: launch.zip
It works as expected using the legacy debugger.
Versions VSCode: 1.56.2 Node.js: 14.16.0 Electron: 12.0.7 Debugger for Chrome 4.12.12
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
@connor4312 can I use
pwa-msedge
instead ofpwa-chrome
? Verified if so. (I don’t have Chrome installed and I like it that way 😄 )