Step 1: set IDEA remote debug parameters(basicly only port)
Step 2: copy the command
Step 3: paste into the server jar start up command, like this:
sudo java -Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5555 -jar ./xxxx.jar >>xxxxx.log
notice: it means starting the jar with the debug mode, and continuing outputing to xxxx.log
(start a jar file on test environment)
java -Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5555 -jar ./xxx.jar --spring.profiles.active=test >>debug.log