Attach visual studio debugger to electron app

后端 未结 3 766
梦谈多话
梦谈多话 2020-12-29 07:15

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

3条回答
  •  死守一世寂寞
    2020-12-29 07:53

    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!

提交回复
热议问题