Version 1

    If you are debugging your test case, you may find that none of your break points work.

     

    Keep in mind that if you're running against a remote container, your test will not run inside the same Java VM as you launched it from. Rather, it will run in the remote container's Java VM. Therefore, you have to start the container's Java VM in debug mode and connect your debugger to it. For more information on how to setup remote debugging, see DebugtomcatjbossEclipse.

     

    If you are using JBoss AS, the quickest way to setup debug mode is to add the following line to the end of $JBOSS_AS_HOME/bin/run.conf (Unix/Linux):

     

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

     

    or before the line :JAVA_OPTS_SET in $JBOSS_AS_HOME/bin/run.conf.bat (Windows)

     

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

     

    Keep in mind your container will always run with debug mode enabled after making this change. You might want to consider putting some logic in the run.conf* file.