I\'m attempting to debug electron app from visual studio 2017 (and not vscode) from scratch.
I created a console nodejs project, install and save electron. Project s
This is actually very easy to do.
Go to Debug > Attach to process... and enter the Webkit websocket connection type and http://127.0.0.1:5858 as the target.
Your breakpoints are now enabled.
In your "Node.exe Options" field, add --debug=$DEBUG_PORT
for NodeJS v6 and below or --inspect=$DEBUG_PORT
for NodeJS v7 or greater where $DEBUG_PORT
is meant to symbolize the port you have specified in your debug configuration.
If you don't pass a port and only pass the --debug
or --inspect
flag, then Node debugger listens on ports 5858 and 9229 respectively... they changed the default port to 9229 in later versions of node.
Let me know if this helps!
Attaching to and Debugging Electron -> To start a debugging session, open up PowerShell/CMD and execute your debug build of Electron, using the application to open as a parameter.
$ ./out/D/electron.exe ~/my-electron-app/
For complete documentation read here.
For seeing why symbols are not loading type the following commands in Windbg.
> !sym noisy
> .reload /f electron.exe
Creating an Electron app using Visual Studio (not VSCode) w/ Node.js tools