debugging

Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware, thus making it behave as expected. read more at WikiPedia

  • As Git Bisect is not clear a lot of people, here is a nice PDF to look at Enjoy Fighting regressions with git bisect, LinuxCon EU 2013.pdf

    it is about "Linux" combinational explosion... Bug software have the following properties (not desired):

    • has many different "configurations"
    • may fail under one configuration but not another

    N configurations, T tests and C new commits means that a release needs:

    C * N * T tests performed

    where N and T, at least, are growing with the size of the software.

    Git Bisect help find a first bad commit and use a binary search algorithm for efficiency if possible.

  • apache_maven

    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.