« December 15, 2006 | Main | January 8, 2007 »

December 22, 2006 Archives

December 22, 2006

Conditional Breakpoints in JDeveloper

Setting breakpoints in JDeveloper is very simple, you just click on the left margin next to the line where you want to stop and mark a break there.
I'm quite sure that many people just do that and live happily ever after, but for those who are looking for a bit more control there are actually properties you can set on the breakpoint.

For example, suppose you have a loop in your code that seem to break after the 100th time you go through the loop. You want to set a break point on a line inside the loop but you don't want to break for the first 100 times this line is reached.
In such a case you can define a conditional break point.
Just right click on the break point and choose "Edit Breakpoint".

Then go to the conditions tab and set the condition that will actually break the code.
For example a.equals("hello1234") if you want to stop when the string a has the value hello1234 and you reach that line.


(pressing the help button in this window will show you some other possible conditions).

By the way you can also set a conditional based breakpoint not on a specific row. Just pop-up the debugger's breakpoints window and right click to create a new breakpoint which won't be associated with a specific line but rather with a specific condition.

About December 2006

This page contains all entries posted to Shay Shmeltzer's Weblog in December 2006. They are listed from oldest to newest.

December 15, 2006 is the previous archive.

January 8, 2007 is the next archive.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type and Oracle