This is something I had been trying to do for a while but has never attempted. It is not recommended to do in the production server. But a lot of times I want to debug my application running in the test server through my local eclipse.
Following link gives clear idea about what needs to be done.
https://confluence.sakaiproject.org/display/BOOT/Setting+Up+Tomcat+For+Remote+Debugging
Basically,
Open startup.sh from your CATALINA_BASE
add
export JPDA_ADDRESS=8000
export JPDA_TRANSPORT=dt_socket
bin/catalina.sh jpda start
edit, exec “$PRGDIR”/”$EXECUTABLE” jpda start “$@”
run the eclipse in the debug mode for “Remote Java Application”.