使用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

相關文章
相關標籤/搜索