I've joined to an open source project, called Kando ( https://github.com/kando-menu/kando ).
And I can't make breakpoints work in VSCode :(
When I set a break point and run the application, it says "unbound breakpoint". Debugging works in Developer Tools though. I wonder if Developer Tools gets automatically attached to the project and prevents VSCode debugger from working properly?
I've added project's top level folder to VSCode:
tsconfig.json:
launch.json:
Trace log: https://rentry.co/s5865zvq
(dev of Kando here)
You question made me look deeper into this and based this guide, I came up with a solution. In the case of Kando, you can use this .vscode/launch.json
:
{
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Kando: Main Process",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/tsx",
"runtimeArgs": [
"node_modules/@electron-forge/cli/src/electron-forge-start",
"--",
"--remote-debugging-port=9223"
],
"autoAttachChildProcesses": true,
"internalConsoleOptions": "openOnFirstSessionStart",
"console": "integratedTerminal"
},
{
"name": "Kando: Renderer Processes",
"type": "chrome",
"request": "attach",
"port": 9223,
"webRoot": "${workspaceFolder}",
"timeout": 100000
}
],
"compounds": [
{
"name": "Kando: All",
"configurations": ["Kando: Main Process", "Kando: Renderer Processes"]
}
]
}
If the port 9223 is not available on your system, simply use something else. I wrote down the findings as a guide here: https://kando.menu/debugging/