I'm using IntelliJ as development tool and I wanted to know how to debug an Electron application?
I'm aware there is a standard way to debug Electron applications, but this method is done outside of my IDE.
I've tried to create a new "Node.js" "Run/Debug Configuration" using:
<path to node>
<path to my application root folder>
node_modules/.bin/electron
.
With this settings, my application starts, but if I put a breakpoint in my main.js
the application never stops on the breakpoint (= debugging doesn't work).
You can start your Electron application in debug mode using the --debug flag, which will—by default—enable remote debugging on port 5858. Visual Studio Code is a free, open-source IDE available for Windows, Linux, and macOS and has been—coincidentally—built on top of Electron by Microsoft.
In WebStorm, the JavaScript debugger works out of the box and in most cases its default settings are sufficient. If necessary, you can configure the debugger as described in Configuring JavaScript debugger. WebStorm supports debugging client-side applications running on the built-in or an external web server.
Start debugging If your application is running in the development mode on localhost , you can start debugging it from the built-in Terminal ( Alt+F12 ), from the Run tool window, or from the Debug tool window. Just hold Ctrl+Shift and click the URL at which the application is running.
Yes, IntelliJ Ultimate includes all WebStorm features. Most of them come as bundled plugins, but some features, e.g. Node. js support, are available as free plugins.
This is how I set it up, and it worked great. I then just put my break points inside of webstorm and it just works.
In webstorm create a new runtime configuration that looks like this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With