Friday 22 November 2013

PL SQL Developer Conditional Breakpoint

Making Conditional Breakpoint

When you make a breakpoint conditional, the debugger pauses when a certain condition is met.
When breakpoint is first set, the debugger pauses the program execution each time the breakpoint is encountered. However, using the Edit Breakpoints dialog, you can customize breakpoints so that they are activated only in certain conditions.

The Conditions tab in the Breakpoint dialog is where you enter an expression that is evaluated each time the debugger encounters the breakpoint while executing the program. If the expression evaluates to true, then the breakpoint pauses the program. If the condition evaluates to false , then the debugger does not stop at that breakpoint location.

To set a breakpoint condition:

  1. Set a breakpoint on a line of code by clicking to the left of the line in the Code Editor.
  2. Open the Breakpoints window by choosing V iew | Debug Windows | Breakpoints.
  3. In the Breakpoints window, right-click the breakpoint you just set and choose Edit Breakpoint.
  4. In the Edit Breakpoints dialog, click Conditions .
  5. Enter an expression in the Condition field, for example:
    1. field = 20
    2. field > 10
    3. field != 30
  6. Click OK

Developer 4.0.13 breakpoint example:

put your mouse cursor over breakpoint and Box will appear


Enter some conditional breakpont value example:
   name_of_field > 31000
   if is in a cursor lets say ;
      for c1 in (select * from table)
    you would need to enter c1.name_of_field = value_to_break



and just run debugger

When condition is met popup will be shown


0 comments:

Post a Comment