Controlling Breakpoints

(Ray Robertson) #1

I think I’m not using the best method establish breakpoints. I spend a lot of time doing this:

  1. Set a breakpoint, and run in debug mode several times to that point until problem is resolved.
  2. Then run into another issue farther into the script, so I:
    A) Delete All Breakpoints
    B) Set a new breakpoint

Is there a better approach? I thought of using Execute To Here instead of breakpoints, but that doesn’t help with needing to pause multiple times at the same point until the issue is resolved. Temporary breakpoints won’t help in this case.

It would be cool if “Execute To Here” would ignore previous breakpoints, but perhaps that would be confusing. Plus, I’d have to set it again when running again.

A modifier key combination (opt-cmd) click to add a new breakpoint while deleting all others would be ideal in my mind, unless I’m missing some existing option.


(Shane Stanley) #2

Why not just delete the breakpoint you no longer need (by dragging it out of the gutter)?

(Ray Robertson) #3

It’s way up off the screen typically. I’d have to navigate there to delete it. Faster to delete all.

(Mark Alldritt) #4

There is a list of breakpoints (4th area) in the debugging area.

You can click checkboxes to enable/disable breakpoints, or use the contextual menu to delete the breakpoint or scroll to its location in the source code. You can also expand each breakpoint in this list to alter the details of the breakpoint.

(Ray Robertson) #5

Excellent, Mark. Thanks. I had long overlooked the Debugging pane/section. That will help. And now I need to think about how I might use breakpoint details.

(Ed Stockly) #6

Here’s a thought, when you click the Breakpoints button in the tool bar (Or Break on Breakpoints in the Script menu), it deactivates all the breakpoints in the script. Click it again and they’re all active (except the ones you’ve individually made inactive). Then if you set a new breakpoint or make any one breakpoint active that makes them all active.

I think a case could be made that after making them all inactive, a new breakpoint or clicking to make one or more active shouldn’t reactivate all of them (you have the button to do that) but should just activate the newly created or reactivated breakpoint.