With those steps a remote debugger can be attached on MacOS / Eclipse:
(1) Start the Tomcat server in debug mode
Code:
export JPDA_ADDRESS=8000
export JPDA_TRANSPORT=dt_socket
catalina.sh jpda run
(2) Set a breakpoint in the source code
(3) Create and launch a debug configuration
- Open the menu "Run > Debug configurations"
- Create a new configuration in the "Remote Java application section"
- Enter e.g. hostname "localhost" and port "8000"
- Start the debugging by clicking on the "Debug" button
(4) Trigger the breakpoint
Then open the application and navigate to the location of the breakpoint.
Now the debugger should kick in and enable stepping through the source code.
Also see
- https://blogs.mulesoft.com/dev/tomcat-tcat-server/debugging-your-tomcat-webapp-with-eclipse/
- http://www.captaincasademo.com/forum/posts/list/510.page