Dimitri Missoh
enthusiastic technologist and problem solver

October 20th, 2008

Use conditional breakpoints to simulate a bug or system out in third party code

Suppose you want to system out the value of a variable your are interested in or even change it value to simulate a bug during a debug session in a third party code, e.g. in a packaged library. We assume that you download the source code and attach it to your library. Since you are compiling your code again the library, you can neither change any part of the code located in the library nor compile it to see the effect of your change. You can easily achieve this task in eclipse using conditional breakpoints. Just double click to add a breakpoint as usual and use the context menu on this breakpoint to open the “Breakpoint Properties” dialog. The default option stops the debugger at a conditional break point only if it returns true. So terminate you code block with a return false, to no interrupt the code execution. Screenshots show two use cases. In the first one we use this feature to system out the value of a given label, and in the second example we use conditional break point to set the value of the variable window to null to simulate a bug and see how our code react on a null pointer exception.

System out with conditional breakpoints

Set a variable to null with conditional breakpoint

May 25th, 2008

Source code available from Subversion

The source code of all of my projects is now available from the Google subversion repository. Google friendly gives every developers the possibility to store and manage all kind of projects using subversion. If you also wants to host you own project, read the very useful blog entry on http://blog.msbbc.co.uk/2007/06/using-googles-free-svn-repository-with.html.
Here is the URL you need to anonymously check out my projects:


To use subversion under eclipse you need the plug-in Subclipse you can download for free under http://subclipse.tigris.org/.