(looks like my question is evolving, after solving it I will edit it appropriately)
As in the title. I can run Tomcat as a service, but I have no idea how to run it in debug mode.
I've tried to run it in debug mode from terminal as in this question:
https://stackoverflow.com/questions/16689274/how-to-start-debug-mode-from-command-prompt-for-apache-tomcat-server
For unix first export variables:
export JPDA_ADDRESS=8000
export JPDA_TRANSPORT=dt_socket
and to start server in debug mode:
%TOMCAT_HOME%/bin/catalina.sh jpda start
So I ran
$ export JPDA_ADDRESS=8000
$ export JPDA_TRANSPORT=dt_socket
$ sudo /usr/share/tomcat9/bin/catalina.sh jpda start
I got in response
Using CATALINA_BASE: /usr/share/tomcat9
Using CATALINA_HOME: /usr/share/tomcat9
Using CATALINA_TMPDIR: /usr/share/tomcat9/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/share/tomcat9/bin/bootstrap.jar:/usr/share/tomcat9/bin/tomcat-juli.jar
Tomcat started.
netstat -tpln | grep 8080
or 8000
shows me nothing.
However, when I'm running Tomcat as a service it starts listening on 8080 port. That's why I'm thinking that it would be nice to have it running in debug mode as a service, but I don't know how to do this.