Debugging in Maven?

前端 未结 8 1557
眼角桃花
眼角桃花 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:50

    I use the MAVEN_OPTS option, and find it useful to set suspend to "suspend=y" as my exec:java programs tend to be small generators which are finished before I have manage to attach a debugger.... :) With suspend on it will wait for a debugger to attach before proceding.

    0 讨论(0)
  • 2020-11-28 03:52

    Why not use the JPDA and attach to the launched process from a separate debugger process ? You should be able to specify the appropriate options in Maven to launch your process with the debugging hooks enabled. This article has more information.

    0 讨论(0)
提交回复
热议问题