Archive of UserLand's first discussion group, started October 5, 1998.
[Utility] Removing breakpoints 0.1
Author: Tommy Sundström Posted: 5/24/1999; 1:13:14 AM Topic: [Utility] Removing breakpoints 0.1 Msg #: 6607 Prev/Next: 6606 / 6608
After debugging there usally is a number of breakpoints left in the scripts, causing irritation next time you try to debug it.This script will clean them out. It can be copied into a menu or be runned as a script (please change the last line accordingly)
«Removes the breakpoints from all scripts of the table where the cursor is located. «If the cursor is in a script it will clean out breakpoints also from other scripts located in the same table. «If the shift key is down and the cursor is on a table, it will clean out the breakpoints of the parent table (useful for cleaning an entire gdb) « «It will expand the scripts. «Warning! If it encounters breakpoints in an uncompiled script (like an agent that you've uncompiled to prevent it from running) it will compile it.on breakpointRemover(adrStart = table.getCursorAddress ()) { local (shiftStatus = kb.shiftKey ()); case typeOf(adrStart^) { tableType { if shiftStatus { adrStart = parentOf(adrStart^)}; };// (else do nothing) scriptType { // (plan: run visitor on this script only) adrStart = parentOf(adrStart^)}} else { adrStart = parentOf(adrStart^)}; local (ct = 0); on visitor(adr) { if typeOf(adr^) == scriptType { local (flChanged = false); msg("Removing breakpoints from @" + adr + " (Total removed: " + ct + ")"); target.set(adr); op.firstSummit(); op.fullExpand(); loop { if op.go(flatdown, 1) { if script.clearBreakpoint () { ct++; flChanged = true}} else { break}}; if flChanged { script.compile(adr)}; return(true)}}; «fileMenu.saveMyRoot (adrStart) // saves the database, to make rollback possible if anything goes wrong. table.visit(adrStart, @visitor); msg("Removed " + ct + " breakpoints from @" + adrStart)};
breakpointRemover(); // Use this when running from a menu «breakpointRemover(@root) // Use this when running as a script. // @root will clean out every bookmark in every open odb (please read the warning in the beginning of the script) // You can change the address to make the script run quicker on a smaller selection
There are responses to this message:
- DG heats up // (comments) in messages..., , 5/24/1999; 9:34:51 AM
This page was archived on 6/13/2001; 4:50:23 PM.
© Copyright 1998-2001 UserLand Software, Inc.