Have you ever used our breakpoint groups feature while debugging?
Today I found a great feature that the Oracle JDeveloper debugger has. I often have a lot of breakpoints in order to help me debug a problem. But often I only want to stop at those breakpoints after I've gotten the application into a particular state that is causing the problem. Until today, I've been:
- individually disabling all those breakpoints one by one
- debugging my app until I get to the stop that's just before clicking on the button or link in the browser that will cause the problem
- individually enabling all those breakpoints one by one
- Clicking on the web page to hit my first breakpoint
Kind of a hassle. Today I noticed that we support a feature called breakpoint groups. I clicked on one of my breakpoints in the Breakpoints window and did Edit Breakpoint from the context menu. At the bottom of the breakpoint definition dialog, there's a field where I can type in the name of a breakpoint group (or pick an existing one from the poplist). So I typed in a name like "mygroup" and hit (Ok). This updated the breakpoints window to show my just-edited breakpoint indented under a new "mygroup" node. The first breakpoint in the group! Then I noticed that I could drag and drop other breakpoints in the breakpoints window into that group, so in a few drags and drops, I had all of my breakpoints as part of the new "mygroup" breakpoint group.
Now comes the neat part. The node named "mygroup" in the breakpoints window has a "Enable All" and "Disable All" context menu that let's me do in one click what I was previously doing with many, separate operations. Cool.
Then, I found another debugger feature that was even cooler than this. Once I created this "mygroup" group of breakpoints, I create a new breakpoint at a place in my application that I wanted to be the place where the whole group of other breakpoints should become enabled, and on the breakpoints dialog, I clicked on the "Action" tab to setup an action to occur when the breakpoint is hit. In addition to playing a sound or making a beep, another action you can have the debugger take is to enable (or disable) a whole group of breakpoints by name. So, by initially setting all the breakpoints in the "mygroup" to disabled, then setting up a new breakpoint whose action automatically enables my other group, I was able to save myself even more time.
7:00:48 PM
|