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
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!