Written by Olivier Le Diouris, Oracle Corporation
We are going to explain how to debug a multithreaded java application, using the convenient conditional breakpoints you can set in JDeveloper 10g.
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".
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:
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:
In addition, you also have the possibility to state you own condition for the breakpoint in Java, in the dedicated field, labeled "Condition".
The watches can be used to compute values, evaluated when a breakpoint is hit.