Including local var info in Idea classes to aid plugin development
Hello,
I am writing a custom lang plugin for Intellij Idea 10. In the typical plugin dev setup, the included Idea classes do not have local variable information. My goal is to include local var information so that I can step into idea classes when debugging my plugin code. What is the best way to do this?
thanks
Siddharth
Please sign in to leave a comment.
Hello Siddharth,
If you build the CE distribution from source, it will include debug info
in the jars by default.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
I'm assuming here that you're running the Ultimate Edition of IDEA (also known as "IU" edition) and your problem is not that you can't see the source, but that when you're debugging your plugin all the classnames and variables are obfuscated?
This is because your run configuration is running your plugin in an instance of the "IU" edition - the binaries of which are intentionally obfuscated.
Assuming this is the problem - what you want to do is run your plugin in an instance of the Community Edition so you can see the variable, parameter and classnames.
Next time you run your plugin using the run configuration thingamajig, it will run it in the IC edition of IDEA which has all the debug info you're after.
If you want to see the source for the classes and variables that you can now see in your debugger, you need to hook the source up for the "IDEA SDK" that you created above (under the "sourcepath" tab of the SDK). You'll need to get the sourcecode from Git, but you don't need to actually build the CE from sources.
One thing to note though, is that if you just pull the latest source from Git, you'll actually have the sources for the *next* version of IDEA (which is probably not what you want and may not even be stable).
If you just want the source for the version of the IDE that you're developing your plugin for, make sure you checkout the correct source ("idea/107.105" for v10.5 of IDEA).