Eclipse远程调试Java程序

1. 在服务器上运行jar包时加入参数

-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

2. 在Eclipse中操作

Run-> Debug Configuration-> Remote Java Application -> 在右侧输入ip和端口,点击Debug即可

原文地址:https://www.cnblogs.com/juzii/p/4961358.html