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
Step 4: click idea remote debug button and you are ready to rock

本文详细介绍了如何使用IDEA进行远程调试的过程。首先设置IDEA的远程调试参数,主要是端口号;然后复制命令并粘贴到服务器的jar启动命令中,确保以调试模式启动jar文件并将输出重定向到日志文件;最后,在IDEA中点击远程调试按钮即可开始调试。
6526

被折叠的 条评论
为什么被折叠?



