eclipse maven debug

1、Debugging with the Maven Jetty Plugin in Eclipse (step 1 )

  导航菜单->Run->External Tools->External Tools Configurations...

  Select "Program" and click the "New" button

  On the "Main" tab, fill in the "Location:" as the full path to your "mvn"        executable. For the "Working      Directory:" select the workspace that 
  matches your webapp. For "Arguments:" add jetty:run.

  Move to the "Environment" tab and click the "New" button to add a new    variable named MAVEN_OPTS with the value:
 -Xdebug -Xnoagent -Djava.compiler=NONE  -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y

  If you supply suspend=n instead of suspend=y you can start immediately    without running the debugger and launch the debugger at anytime you really
 wish to debug.


  pull up the "Run/Debug/Debug ..." menu item and select "Remote Java Application" and click the    "New" button. Fill in the dialog by selecting your webapp project for the "Project:" field, and ensure  you are using the same port number as you specified in the address= property above.

2、Debugging with the Maven Jetty Plugin in Eclipse (step 2 )

 导航菜单-> Run-Debug Configurations...->Remote java Application

Now all you need to do is to Run/External Tools and select the name of the maven tool setup you created in step 1 to start the plugin and then Run/Debug and select the name of the debug setup you setup in step2.




你可能感兴趣的:(eclipse maven debug)