Configuring IntelliJ 14 to debug an externally deployed Glassfish app

Hi All IntelliJ IDEA experts,

I seek help (if possible please with screenshots) on how to configure
IntelliJ IDEA 14 to just debug a Glassfish 3.1 EAR and WAR
App deployed externally. I mean mvn build and deploy via Glassfish
Admin console and only debug from IntelliJ .

I go to set a local debug config in Glassfish and it insists on
deployment of artifacts (which I do not want to do via IntelliJ)

Reason for not deploying via IntelliJ is that 2 WAR files  depend on
EAR to be deployed before hand and currently I think IntelliJ does not let you
juggle the deployment order and sorts deployment artifacts by namewise in the
natural sort order (A limitation)

Please help with externally configured artifacts based debug configuration help!

Comment actions Permalink

You should use Remote Glassfish Run/Debug configuration instead of the local one.

In Startup/Connection tab, Debug you will see the options that you need to pass to Glassfish so that IDEA can connect to it with the debugger.

Comment actions Permalink

Thanks for your reply!
One more doubt.
Do I also need to have these debug flags set explicitly in my domain config xml

<java-config  debug-options="-agentlib:jdwp=transport=dt_socket,address=9009,server=n,suspend=‌y" system-classpath="" classpath-suffix="" java-home="C:\Java6\u29">

Kindly let know.

Comment actions Permalink

Yes, you need Glassfish to start with the suggested options.

Comment actions Permalink

Dear @Serge Baranov, Can you please point me to video, URL, Blog Link (anywhere on the web) where GlassFish App Server is configured to deploy EAR and WAR and debug app in IntelliJ where GlassFish server is started externally with artifacts deployed on it already and IntelliJ needs to connect to it for debugging ? As far I as I searched, Glassfish and IntelliJ Debugging is not extensively on the net discussions / links. Any that you know of.
I am "stuck" with forcing to use Eclipse at my office as debugging works in it. But I miss code inspections and intentions provided by IntelliJ. !!!!

Comment actions Permalink

Also to note , in IntelliJ Idea 14, when configuring for remote debug why does the profile keep on switching back to RUN , even when I select DEBUG . Bug ?


Please sign in to leave a comment.