Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
vertx:debug [2017/03/15 00:08]
2a02:0908:01b8:3a80:c0a3:0d18:7d20:0d05
vertx:debug [2020/11/16 16:26] (current)
172.68.37.37 old revision restored (2014/08/03 19:51)
Line 1: Line 1:
 === Debugging vert.x applications with Eclipse === === Debugging vert.x applications with Eclipse ===
  
-(Please note that this description applies to vert.x 2.1.x)+Please note that this description applies to vert.x 2.1.x.
  
 When debugging vert.x applications inside Eclipse, I could get breakpoints to work when starting a unit test in Eclipse with Debug as Junit, but for some reason I couldn't put any breakpoints when running the complete application with a maven task (even though this supports Debug as as well). When debugging vert.x applications inside Eclipse, I could get breakpoints to work when starting a unit test in Eclipse with Debug as Junit, but for some reason I couldn't put any breakpoints when running the complete application with a maven task (even though this supports Debug as as well).
  
-The group suggested using mvnDebug (actually that was Tim I think), which supports running a maven build with the debug listener option in the JVM so that it is possible to attach from Eclipse or another IDE to the process.+The group suggested using mvnDebug (actually that was Tim), which supports running a maven build with the debug listener option in the JVM so that it is possible to attach from Eclipse or another IDE to the process.
  
-In the case of vert.x, the command to run the program is (in a command window or terminal)+In the case of vert.x, the command to run the program is
  
     mvnDebug vertx:runMod     mvnDebug vertx:runMod
Line 15: Line 15:
 In Eclipse inside your maven project, add a Debug configuration for Remote Java Application using host localhost and port 8000, you should probably call it yourprojectname (debug) or something similar, the default names just add a counter, which is not very useful. In Eclipse inside your maven project, add a Debug configuration for Remote Java Application using host localhost and port 8000, you should probably call it yourprojectname (debug) or something similar, the default names just add a counter, which is not very useful.
  
-Now you can start debugging by selecting Debug configurations and then your project name (for some reason this is not showing up in the list under Debug As, I have not found out why) and the maven build will start in the command window.+Now you can start debugging by selecting Debug configurations and then your project name (for some reason this is not showing up in the list under Debug As, I have not found out why that is) and the maven build will start in the command window.
  
-If you have set a breakpoint in the Verticle code, it will stop there when the build process is reaching the execution of the vertx-maven-plugin and you can continue from there.+If you have set a breakpoint in the Verticle code, it will stop there when the build process is reaching the execution of the Verticle and you can continue from there.