Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
vertx:debug [2022/01/09 11:09] 85.25.185.238 old revision restored (2022/01/08 05:39) |
vertx:debug [2022/06/13 04:56] (current) 172.70.135.136 old revision restored (2022/01/20 16:05) |
||
---|---|---|---|
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' | 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' | ||
- | 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: | mvnDebug vertx: | ||
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 | + | 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 |