Debugging in Maven?

前端 未结 8 1643
眼角桃花
眼角桃花 2020-11-28 02:56

Is it possible to launch a debugger such as jdb from Maven? I have a pom.xml file that compiles the project successfully. However, the program hangs somewhe

8条回答
  •  渐次进展
    2020-11-28 03:38

    Just as Brian said, you can use remote debugging:

    mvn exec:exec -Dexec.executable="java" -Dexec.args="-classpath %classpath -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044 com.mycompany.app.App"
    

    Then in your eclipse, you can use remote debugging and attach the debugger to localhost:1044.

提交回复
热议问题