Under Linux (CentOS):
In the first line of catalina.sh added:
CATALINA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n"
address = 5005 (here you deebug port, and can be customized).
And then start the SH catalina.sh Start;
Setting idea:
Then click on the small reptiles open debugging.
If you start a connection, said second debug port occupied, just reboot the server to reconnect to the tomcat