作者:神烟醉_263 | 来源:互联网 | 2023-10-12 18:16
最近在研究electron,考虑到以前一直用PhpStorm做开发,而且electron就是基于nodejs的,因此很自然的想到要继续用PhpStorm做IDE。开发打开RunDe
最近在研究electron,考虑到以前一直用PhpStorm做开发,而且electron就是基于nodejs的,因此很自然的想到要继续用PhpStorm做IDE。
开发
打开Run/Debug Configurations窗口,添加一个Node.js配置:

然后配置Node Interpreter参数,对于windows系统,配置为项目目录下的node_modules.bin\electron.cmd。Javascript file参数,配置为main.js:

调试
打开Run/Debug Configurations窗口,配置Application parameters参数:
--remote-debugging-port=9222

开启nodejs代码辅助
未开启nodejs代码辅助之前,IDE内会有提示:

开启方法:
