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.

Comments:

If you want to break after 100 times, just set the Pass Count to 100. That's exactly what the Pass Count field is for.

Posted by Liz Looney on February 28, 2007 at 04:08 AM PST #

thank U.

Posted by Mukaaram on June 14, 2013 at 07:10 AM PDT #

Hi,
In my AppModule I have defined a method, while debugging my application module method that seems to be causing an error when the argument value is anything but "2". Suggest me how can I debug this issue?

Posted by guest on July 25, 2013 at 09:37 PM PDT #

guest, set a breakpoint on your AppModule service method.
Then right click the appmodule and choose debug.
In the swing client that comes up you can double click the AM and you'll get a screen that will allow you to invoke the method.

Posted by guest on July 29, 2013 at 10:59 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

me
I'm a Director of Product Management for the Oracle Java Development Tools.
Follow me:
Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today