Is debugging under JBoss possible ?
Is it possible to debug EJB in JBoss using IntelliJ ?
if so, how ? I can?t find anything about this anywhere :(
is there any JBoss integration in IntelliJ.. i couldn?t get the plugin to work...
Please sign in to leave a comment.
I don't see any reason why you couldn't use the remote debugging features of IDEA to debug EJB's in any container, including Jboss. I debug EJB's in weblogic using these features and it works great. I add the following flags when starting weblogic to enable remote debugging from IDEA:
-Djava.compiler=NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
These parameters are explained in the Java SDK docs. The IDEA docs are pretty good and should explain how to attach to the running VM after you add these java flags when starting Jboss. I can't comment on the plug-in because I've never used it.
Grant
Yes, you can debug ejbs and servlets under jboss.
You'll need to set JAVA_OPTS env variable inside run.bat or run.sh (depending on your OS).
In run.bat you already have it, it's just commented out.
This will run jboss with remote debugging on port 8787 enabled.
You can start remote debugging session from IDEA.
this seems to work, but when i add breakpoints to my code and run testclients or do things on my web nothing happens..
the brakepoints got a green cross, no matter where i put them.
the thing is, i?m not really sure what i should do. Do i add breakpoints and deploy again ?..
if anyone could tell me how debugging JBoss with Remote debugging in IntelliJ is done, i would be really thankful.
And if this is possible, what other functions does the JBoss integration plugin have ?
If your breakpoints are not being hit, my first guess would be you are not generating debugging info when compiling. You only need to redeploy when your code changes.
If you are using Intellij to compile, make sure the check box is checked in the compiler options. If you use ant, you need to specify it yourself to the javac task. Deploy your application and attach the debugger to the running jboss VM where you deployed your code. Add a breakpoint to your source and access a jsp page or service that will excercise your class in the container.
If it still doesn't work than you messed up somewhere along the line or your breakpoint is set in code that is not being executed by the container.