Debugging in Maven?

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

    I found an easy way to do this -

    Just enter a command like this -

    >mvn -Dtest=TestClassName#methodname -Dmaven.surefire.debug test
    

    It will start listening to 5005 port. Now just create a remote debugging in Eclipse through Debug Configurations for localhost(any host) and port 5005.

    Source - https://doc.nuxeo.com/display/CORG/How+to+Debug+a+Test+Run+with+Maven

提交回复
热议问题