Linux服务器

Linux服务器远程Debug模式

在Linux下远程本地Debug模式
1.在服务器关闭需要debug的服务(项目工程),填写一个服务器没有用过的端口号,执行下面命令
java -jar e-distribution-server.jar -Xdebug -Xrunjdwp:transport=dt_socket,suspend=n,server=y,address=5505 &
2.在IDEA下新建Remote:
1.Name 随便填写
2.Host 服务器IP
3.Port 执行的命令中的端口
4.填写 Command line arguments for remote JVM:
-Xdebug -Xrunjdwp:transport=dt_socket,suspend=n,server=y,address=5505
5.在Use module classpath:选择需要debug的项目

Linux服务器