c0nnexx10n : C0nnect1ng L1fe w1th Techn010gy

Byte by Byte Impressions on Technology, People and Process !

Remote Debugging | Fitnesse with Eclipse

Posted by Vikas Hazrati on Wednesday, December 5, 2007

We use Fitnesse as the acceptance testing tool for our projects. Many a times it becomes a necessity to remotely debug how the fitnesse fixture is running through your code.

This blog would try to explain how you can easily set up a remote debugging session between Fitnesse and Eclipse so that you can debug through the code as your fixture is being executed.

In your Eclipse IDE

1. Goto Run->Open Debug Dialog

2. Right click on Remote Java Application option in the left hand menu tree and say new

3. Create a remote java application debug configuration like this

screenshot-debug.png

4. Add the sources to the configuration. These should be all your java projects.These are required so that while remotely debugging you can walk through your code

screenshot11.png

5. Now your Eclipse configuration is done. Note that we have told eclipse to listen at port 1044 and have specified all the source files that it should use for code walkthrough.

6. If you hit the debug button at this moment you would get an error. Why? because right now fitnesse is not executing and eclipse would not find anything to listen to at port 1044. Hence you would see something like this

screenshot-problem-occurred.png

7. Now add the following line to the fixture that you want to debug

!define COMMAND_PATTERN {java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=1044 -cp %p %m}

5. Start the test in fitnesse

6. Goto Eclipse, open Debug dialog, select the Remote java application that we just created and hit debug button.

7. The debug view would now open at the first breakpoint

Happy Debugging!

5 Responses to “Remote Debugging | Fitnesse with Eclipse”

  1. Nimesh said

    Hey,
    Thanx for the info it helped me a lot

    Regards,
    Nimesh

    • vikashazrati said

      Great that you found it useful Nimesh.

  2. Hey Vikas, thanks for this blog. It really helped us out!

    See you soon. :-)

    Regards, Vincent.

    • vikashazrati said

      Glad this helped Vincent :)

      Best Regards

  3. Max said

    Thanks for this info, easy to follow and helped a lot …

    Max

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>