X

Shay Shmeltzer's Oracle Development Tools Tips

  • December 22, 2006

Conditional Breakpoints in JDeveloper

Shay Shmeltzer
Director of Product Management - Oracle

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.

Join the discussion

Comments ( 4 )
  • Liz Looney Wednesday, February 28, 2007
    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.
  • Mukaaram Friday, June 14, 2013

    thank U.


  • guest Friday, July 26, 2013

    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?


  • guest Monday, July 29, 2013

    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.


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.