使用PhpStorm或WebStorm做为electron IDE

最近在研究electron,考虑到之前一直用PhpStorm作开发,并且electron就是基于nodejs的,所以很天然的想到要继续用PhpStorm作IDE。node

开发

打开Run/Debug Configurations窗口,添加一个Node.js配置:
使用PhpStorm或WebStorm做为electron IDEwindows

而后配置Node Interpreter参数,对于windows系统,配置为项目目录下的node_modules.bin\electron.cmd。JavaScript file参数,配置为main.js:
使用PhpStorm或WebStorm做为electron IDEelectron

调试

打开Run/Debug Configurations窗口,配置Application parameters参数:
--remote-debugging-port=9222
使用PhpStorm或WebStorm做为electron IDEide

开启nodejs代码辅助

未开启nodejs代码辅助以前,IDE内会有提示:
使用PhpStorm或WebStorm做为electron IDE
开启方法:
使用PhpStorm或WebStorm做为electron IDEdebug

相关文章
相关标签/搜索