AppCode plugin development: How to run/debug from Idea CE Follow
I was about to post a question on how to run/debug a plugin I'm playing with for AppCode, since the default plugin run config crashes during startup.
However, since I just figured it out, I'll post it as a tip instead.
This assumes that you have the plugin project loaded in IntelliJ IDEA (Community edition or Ultimate).
1. Ensure that you have the IDEA Plugin SDK for the project set to use your AppCode installation
2. Create a Plugin run configuration for your plugin
3. Add the following to the VM parameters field for your new run configuration:
That allowed me to run my plugin from IDEA, which means you can have your plugin running in the integrated debugger instead of using the old debug-by-println method.
Please sign in to leave a comment.
As a followup, adding the following options in addition to the ones above will ensure that the test environment has enough memory to actually do something instead of locking up due to lack of memory:
-d32 -Xms128m -Xmx512m -XX:MaxPermSize=250m -XX:ReservedCodeCacheSize=64m
These are the same settings that AppCode ships with (except of -d32 to force 32 bit mode), but they're not automatically picked up by the normal plugin launcher, so we need to add them to the VM arguments are manually.
Is the flags still working, the ones you indicated? -Didea.paths.selector=appCode10 -Didea.platform.prefix=CIDR .
I was trying to use it in my project, but Intellij Idea is opening instead of AppCode?
Is there another way now to debug a AppCode plugin?
The correct platform prefix for AppCode is "AppCode", but I think there are other problems with your project. Did you perform the very first step from Maarten's post? "Ensure that you have the IDEA Plugin SDK for the project set to use your AppCode installation".
Thank you for message.
That's my path to SDK used for the whole project.
I followed all the steps required, and I'm sure the setup is working because in plugin.xml file I can add this line
And there is no error. I double checked to indicate to AppCode installation location. Maybe the
problem is that I'm using Gradle to create the plugin?
Some logs when starting debug:
Yes, the problem is in the gradle configuration. Unfortunately, developing AppCode plugins with gradle-intellij-plugin is not supported at the moment.
You are a life saver. I will try DevKit and will make a post as soon as I'm getting done. Thank you very much Vyacheslav!