Search code examples
javadebuggingpluginsintellij-ideawebstorm

Debugging a plugin for Webstorm from IDEA


I'm working with a plugin for Jetbrain's Webstorm, and we're using IntelliJ IDEA as our IDE for the project; however unfortunately no one has touched this project in a while and remembers how to help the new guy out ;)

Right now I can deploy the .jar file and copy it into Webstorm's plugin directory. I can essentially test by doing that, but I'd like to be able to step through - which is my question to you, since I have no idea what the process is to debug this.

I'm assuming I need to attach IDEA to the process, but I can't figure out where to do so - or if I need to configure Webstorm for anything as well.

Help would be greatly appreciated - thanks!

Edit: bin/Webstorm.exe.vmoptions file

-Xms32m
-Xmx500m
-XX:MaxPermSize=150m
-ea
-Didea.platform.prefix=WebStorm
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

Solution

  • If you want to debug the code of plug-in that runs in WebStorm you need to use Remote debug configuration in IntelliJ IDEA. Copy the suggested JVM options and place them in bin\webstorm.exe.vmoptions file, start WebStorm, execute the Debug configuration in IntelliJ IDEA to connect to the WebStorm instance and step through the code of the plug-in.

    You can also debug this plug-in directly in IntelliJ IDEA using the Plugin Run/Debug configuration type.