How to debug openfire with Eclipse?

Hi,
How to debug openfire with Eclipse?

Thanks in advance.

  1. clone from github
  2. build OF with mvn verify
  3. go to ./distribution/target/distribution-base/bin
  4. start “openfire.sh -debug” (linux) or “openfire.bat -debug” (windows)
  5. look in console, as it tells the debug port to connect to
  6. in eclipse connect with remote debugger to that port