通过 IDEA 去 Debug Jar包
Posted by 2017/7/10 10:15:25 • Author:JK.Li
代码打成Jar之后,要如何进行Debug呢?
下面以 IDEA 来例进行说明:
首先,以以下方式来启动 Jar包
java -Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=y -jar test.jar11
启动之后,你会发现,有如下提示:
Listening for transport dt_socket at address: 500511
这个时候,就卡在这不动了,然后我们进行下面这步:
配置IDEA,按如下配置
启动Debug
这个时候,只要你打了断点了,应该会发现可以进行正常 debug 了。
Tagged: debug
0 评论列表
发表评论
Wise Words
We can let circumstances rule us, or we can take charge and rule our lives from
within .
Earl Nightingale