Search code examples
eclipsejboss7.xremote-debugging

Remote debug JBoss AS 7.1 from Eclipse Indigo


I read some guides on the subject and made the following steps.

http://oreilly.com/pub/a/java/archive/eclipse-jboss-remote-debug.html?page=8 https://community.jboss.org/thread/177687 JBoss debugging in Eclipse

The guides have some distinctions but on the whole they are similar.

The steps I made.

  1. I compiled and deployed my web project and deployed it on JBoss AS 7.1 by clicking Run on Server -> JBoss AS 7.1 in Eclipse.
  2. I stopped JBoss AS in Eclipse.
  3. I uncommented the line

    JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"

in the $JBOSS_HOME/bin/standalone.conf file

  1. I executed $JBOSS_HOME/bin/standalone.sh
  2. I updated the page localhost:8080/MyProject/ in the browser and it worked
  3. I executed Debug -> Debug Configurations in Eclipse, then I created a new configuration with the localhost as the host, 8787 as the port, and MyProject as the project name.
  4. I pressed the Debug button in Eclipse.

When I reach a breakpoint I added, nothing happens.

I expected that Eclipse would stop at the breakpoint as it does in a simple Java application project. What did I do wrong?

Eclipse version: Indigo.

Java.

java version "1.6.0_43"
Java(TM) SE Runtime Environment (build 1.6.0_43-b01)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)

Edit #1.

  1. Window -> Preferences -> Java -> Installed JRE's
  2. Edit JRE being used
  3. Edit 'Default VM Arguments' line

    -XX:+UseParallelGC

It didn't help.


Solution

  • Instead of making the changes in "standalone.conf", make the change in "standalone.conf.bat" .

    Remove the rem from the line "rem set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"" .

    This has worked for me.