Cédric Walter | Oct 8, 2020 | 0
TeamCity remote debug your Maven build
How to remote debug test cases
Change the Team city project configuration by adding a -Dmaven.surefire.debug to #Maven runner in Additional “Maven command line parameters”
Now when test cases will be executed by #maven surefire plugin, the build will wait for a remote debugging application to pick it up on port 5005 and this for EVERY MODULES
meaning: If you have 5 #Maven modules (= java projects) with test cases #maven surefire will request 5 times you to connect with remote debugging to your build server.
Create a Remote #Java Application launcher you’ll also share in one eclipse project:
Don’t forget to remove the -D variable or your daily build may wait for a remote debug connection! or create a special build configuration of your project targeted for debugging purpose.
Remote debugging #Maven plugin
put into “JVM command line parameters:” these settings:
-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5006
Create a Remote #Java Application launcher you’ll also share in one eclipse project that will connect to the port 5006.