Select Page

TeamCity remote debug your Maven build

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”

maven.remote.debug.testcases

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:

maven.remote.debug.launcher

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

debug.maven.in.teamcity

Create a Remote #Java Application launcher you’ll also share in one eclipse project that will connect to the port 5006.

About The Author

I worked with various Insurances companies across Switzerland on online applications handling billion premium volumes. I love to continuously spark my creativity in many different and challenging open-source projects fueled by my great passion for innovation and blockchain technology.In my technical role as a senior software engineer and Blockchain consultant, I help to define and implement innovative solutions in the scope of both blockchain and traditional products, solutions, and services. I can support the full spectrum of software development activities, starting from analyzing ideas and business cases and up to the production deployment of the solutions.I'm the Founder and CEO of Disruptr GmbH.

Categories