最近在研究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