Eclipse remote debug for maven

来源:互联网 发布:口袋打印机 知乎 编辑:程序博客网 时间:2024/06/05 05:56

1、设置系统环境变量MAVEN_OPTS :Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8080;

2、Eclipse中Debug Configurations->Remote Java Application->new ->

      Connect :

Project :xxx

Host:localhost

Port : 8080(这个和#1中设置要一致)

       Source :

Source Loopup Path 引入自己的项目

下面Search for duplicate source files on the path选项打上勾

3、cmd 项目目录下启动 Exg:mvn jetty:run -Djetty.port=8080

4、Eclipse中启动#2中remote debug

5、设置断点即可进行调试

0 0