Conditional Breakpoints and Multi Thread Debugging with JDeveloper 10g

Written by Olivier Le Diouris, Oracle Corporation
March 2004.

We are going to explain how to debug a multithreaded java application, using the convenient conditional breakpoints you can set in JDeveloper 10g.

The code


Program input





Set your Conditional Breakpoints


We have in JDeveloper 10g the possibility to set this kind of condition on a break point. Right click on your breakpoint in the gutter of the code pane, and select "Edit Breakpoint".

Edit Breakpoint

Go to the second tab

Select the second radio button

And give the name of the thread you want to stop on.

Also, you can right click on the header of the table in the breakpoints window, to change the columns displayed, to see the name of the thread you're in:

Thread Name

Thread Name

Even better, if the context you want to track from the debugger is only there after hitting the breakpoint a certain number of times, you can break on it after hitting it let's say 15 times:

Thread Name

In addition, you also have the possibility to state you own condition for the breakpoint in Java, in the dedicated field, labeled "Condition".

Thread Name

The watches can be used to compute values, evaluated when a breakpoint is hit.

Thread Name Thread Name

false ,,,,,,,,,,,,,,,