Thursday, July 21, 2011

Conditional Breakpoints in Eclipse

If you have a big data set that you are using to test changes that apply to specific scenarios or rows, Eclipse conditional breakpoints can help to make life easier and simpler.

In Debug View (obviously!), right-click on the breakpoint that you want to make conditional and in the window that opens up, check "Enabled" box and then the "Conditional" box. This enables the textarea below it where you can enter any valid java expression which should trigger this breakpoint when true.

Optionally, you can also check the "Hit count" box and enter a positive number to make this breakpoint trigger after that many number of iterations.

1 comment:

Michael Dorf said...

This is a really great tip. I use Eclipse debugger constantly but haven't tried conditional breakpoints yet. Your post will make me do it!

LinkWithin

Related Posts Plugin for WordPress, Blogger...