To use remote debugging in eclipse in conjunction with Glassfish there only two configuration steps necessary:1.) enable the Debugging in the Glassfish Server Configuration
2.) In your Eclipse you need a extra Debug Program Configuration
- Open the Web Console and choose menu "Application Server".
- go to the Tab "JVM Settings"
- enable the Debug mode
Now you can start the Debug Mode from your eclipse by running "Debug->Glassfish Debugger"
- Choose in your Eclipse the Menu "Run -> Debug..."
- create a new "Remote Java Application" for example "Glassfish Debuger"
there you cann edit the Projekt and also the remote Port of the System. you need to change form 8000 to 9009.
See also the following blog