IntelliJ plugin development freezes target IntelliJ instance

empire29 :

I am building a very simple IntelliJ plugin, and using IntellIJ CE (2019.1) as my target for build smoke-testing/debugging, deploying via the OOTB IntelliJ Plugin Run Configuration.

Whenever I perform a Run/Debug, it opens IntelliJ CE as expected (as Main java process), lets me select a project to open. Once a project is opened and the IntelliJ UI loads, I have about 5-10 seconds before the UI becomes unresponsive and I get the spinning beachball. I notice that the Main java process (which is for the CE instance), starts to gobble up memory jumping to 5-6GB over the next few seconds (on my 16GB machine). At this point, I can't do much except stopping the process.

Initially, I thought it was my code (perhaps creating an unintentional infinite loop), but I commented everything out of my plugin.xml except a fileType extension (which is basically a Bean), and it still does it. I continued my investigation by grabbing a few other IntelliJ plugin projects from GitHub, and running those (unmodified), to the same effect!! So I don't think its anything to do w/ my plugin in particular.

I've taken thread dumps of the CE process, but nothing jumps out (specifically looking for traces that contain my packages).

Lastly, I've built the plugin as a deployable Jar, and deployed it into both CE and Ultimate, and it doesn't freeze anything up. So it appears this has something to do with the Plugin deployment RunConfiguration (which I've left w/ default params).

I'm on macOS, running the latest (as of this post) IntelliJ 2019.1. I'm developing on IntelliJ Ultimate and deploying to IntelliJ CE (2019.1).


Resolution w/ screenshots based on the selected correct answer:

  1. Create a New IntelliJ Plugin Development SDK pointing at IntelliJ CE install, and set as the Project's SDK enter image description here

  2. Create a New JDK that points to the RJDK downloaded from bintray enter image description here

  3. Assign the JDK created in step 2, as the JDK for the Puggin Development SDK created in Step 1 (via the SDKs tab) enter image description here

  4. Set the Plugin Run Configuration to use the IntelliJ CE SDK. enter image description here

  5. Run the Plugin run configuration, and CE will open with the plugin "hot deployed" to it!

CrazyCoder :

Use JetBrains Runtime 8 or 11 version from https://bintray.com/jetbrains/intellij-jbr or from your main IntelliJ IDEA installation to run the sandbox IDE version. You can specify it in the JRE field of the plug-in Run/Debug configuration.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=157888&siteId=1