Jboss keep changing their startup files and every time I end up looking for the right spot to attach my JPDA settings. Trying the latest and greatest jboss version 6 I was caught by surprise again searching for the right .bat/.sh file. Damn you JBoss :)

So to activate JBoss 6 remote debugging:

1. Open ~jboss/bin/run.conf.bat

2. Uncomment the following line:
rem # Sample JPDA settings for remote socket debugging
set “JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n”

3. Go to jboss folder and fire it up.
~jboss6/run.sh

4. Pay attention. the following line should appear:
Listening for transport dt_socket at address: 8787

3. Finally go back to Eclipse and attach the debug listener
Eclipse / Run / Debug Configurations / Remote Java Application / New