Can I run a custom IDEA bundled app under the IDEA debugger?

I am trying to figure out some odd behavior after I made a small change to IDEA. The change works as expected when I run IDEA under IDEA. However, when I build a bundled macOS application and run that, the change does not work. I have checked several possibilities: the repo has the proper branch checked out, I imported my preferences into the sandbox IDEA, and cleared the cache in the stock IDEA, but nothing changed.

Therefore my question: can I run the custom bundled macOS IDEA that I built under the stock IDEA debugger? The initial problem I have not gotten past is how to run both apps at the same time.

 

0
4 comments

>The initial problem I have not gotten past is how to run both apps at the same time.
You have to set different "idea.config.path" and "idea.system.path" to have them running at the same time.
https://www.jetbrains.com/help/idea/tuning-intellij-idea.html
https://intellij-support.jetbrains.com/hc/en-us/articles/207240985-Changing-IDE-default-directories-used-for-config-plugins-and-caches-storage

>can I run the custom bundled macOS IDEA that I built under the stock IDEA debugger?
Yes. 
First, you should setup "-agentlib" in jvm options of IDE to debug. ex: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
Second, you need "Remote Debug" run configuration in stock IDEA to connect to the running custom IDEA.
https://stackoverflow.com/questions/21114066/attach-intellij-idea-debugger-to-a-running-java-process


0

Not working so far. When I try to run the custom IDEA, all that happens is that the running stock IDEA is brought to the foreground.

What I changed in the custom IDEA.app:

  • Added idea.config.path and idea.system.path lines to Contents/bin/idea.properties
  • Added the -agentlib line to Contents/bin/idea.vmoptions

In addition to using /usr/bin/open to run the custom app, I also tried using open -n. I also tried changing its bundle ID.

It must be IDEA itself causing this behavior.

 

0

It should work. Are these new directorie actually used?

As another option, you can try installing earlier major IDE version (ex: 17.2 or 17.1) and use it to debug custom IDE. 

0

It was my mistake. It is working. Thank you.

 

0

Please sign in to leave a comment.