Setting up debugging help (JBoss). have been searching forums and google, still stuck

I've been working on this all morning trying to get debugging to work with Jboss. Using myeclipse I had this working fine, so I'm sure I can have this working in IDEA with a bit of help.

Currently I have this project that has a bunch of modules (which were a pain to set up because we use maven to build everything so I had to look into all the project files to figure out classpaths). Regardless, I then use ant to move files as needed to an exploded Jboss directory (local).

I've tried setting up remote debugging and all I get is a "conecting to target JVM.." message and never a 'connected succesfully message, nor do breakpoints work (with suspend option set to 'y' the server never starts up either even after starting the debug session so I'm guessing the connection is not getting set up..tried using different ports also).

What I think would work best is if I ran Jboss from within IDEA and then debugged from there. I'm having difficulty setting this up. Any 'instructions for dummies' steps would be nice.

I read one post about setting up the debug options under "application" tab, but I'm not having much luck there either and not sure if that's where I really need to set up JBOSS to run from within IDEA.

Another thing I'm finding confusing is on many of debugging tabs it says on the bottom with a red warning "Module not specified." I don't see anywhere to specify a module for debugging, nor do I really understand what that is referring to since I'm guessing I should be able to debug the whole project and not just a single module?

I'm really confused (aka probably stupid) but really need to get this debugging set up working. Thanks for any help one could provide.

2 comments
Comment actions Permalink

Since we could specify different JDK for each module then it is
important to define active JDK for debugging based on startable module.
One can specify the JDK in combo box titled 'Use classpath and JDK of
module' available on any run/debug configuration panel.

Rick wrote:

Another thing I'm finding confusing is on many of debugging tabs it says on the bottom with a red warning "Module not specified." I don't see anywhere to specify a module for debugging, nor do I really understand what that is referring to since I'm guessing I should be able to debug the whole project and not just a single module?

I'm really confused (aka probably stupid) but really need to get this debugging set up working. Thanks for any help one could provide.



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Thanks for the module tip. that helped a lot. Here's how I got it now to work for me in case someone else is stuck. (Also if this is a dumb way to set up let me know)...

1) Copied the run.bat file and renamed it debug.bat. (On Linux edit the sh files accordingly). In that file you'll see the commented out line for debugging. Leave that commented out and add the line the webapplication module tab says to add:

-Xdebug -Xrunjdwp:transport=dt_socket,address=localhost:8787,server=n,suspend=n

2) For the web executable line in the webapplication tab I added:
C:\jboss-3.2.2\bin\debug.bat -c nam-esg
(where nam-esg is the server instance in jboss that my ant script copies stuff to. If you are using the default server in jboss I'm sure just the path to the bat/sh executable is fine. I might not even need the -c nam-esg above anyway, but it didn't seem to hurt).

3) Working directory: C:\jboss-3.2.2\server\nam-esg
(I'm guessing if you are using the default server and have an application under there, you would point to that).

4) Checked the box "Launch server after debugger starts listening"

Now just start the debugger and wait a bit for jboss to start up and you're good to go.

I probably have some thing stated wrong above so any corrections welcome.

0

Please sign in to leave a comment.