0

CONTEXT: I use JBoss 5.1.0.GA. I deploy an app in the following way: I build all projects (goal: clean install) in Eclipse to produce an .ear file, then I copy the .ear file to the /deploy folder in JBoss, then I run bin/run.bat. So far, everything works fine, as I can access the application in the browser.

Next, I want to do debugging. One important mention: my JBoss server is standalone; there is no entry in the Servers tab in eclipse. So I need to attach a REMOTE debugger.

I read https://stackoverflow.com/a/516214/11233118 and https://maverikpro.wordpress.com/2007/11/26/remote-debug-a-web-application-using-eclipse/

Steps that I followed:

  1. set the JAVA_OPTS variable, in run.conf.bat with
    set "JAVA_OPTS=%JAVA_OPTS% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"

moreover, in run.bat, the JAVA_OPTS is echo-ed, and I see in the output that my settings are kept as above

  1. In Eclipse, I create a new Debug configuration, named "debug", of type Remote Java Application, with port 8787 (as above, in JAVA_OPTS) and host localhost
  2. I click the Debug button in Eclipse; In the Debug view, I can see an entry named debug[Remote Java Application]. Expanding the tree shows that the Threads are running.

  3. I add breakpoints in the code (the second link states clearly: "You can add break points dynamically"), I open the app in the browser, navigate to the corresponding screens, and the application WILL NOT STOP when it reaches the breakpoint. As a check, I have also added log statements, in the same block as the line with the breakpoint. After re-deploying the app, I can see the log messages in the log files, which means I placed the breakpoints in the right place, but still the app will not stop and bring focus to eclipse, as expected.

Any ideas?

I also tried:

when I run run.bat

  • https://stackoverflow.com/a/1920236/11233118 : I use the command telnet localhost 8787; when the eclipse debug[Remote Java Application] is started, it will not connect (which is normal), but when I close the debug configuration, telnet connects , meaning there is no problem with port 8787.

0 Answers0