最近在研究electron,考虑到之前一直用PhpStorm作开发,并且electron就是基于nodejs的,所以很天然的想到要继续用PhpStorm作IDE。node
打开Run/Debug Configurations窗口,添加一个Node.js配置:windows
而后配置Node Interpreter参数,对于windows系统,配置为项目目录下的node_modules.bin\electron.cmd。JavaScript file参数,配置为main.js:electron
打开Run/Debug Configurations窗口,配置Application parameters参数:
--remote-debugging-port=9222ide
未开启nodejs代码辅助以前,IDE内会有提示:
开启方法:debug