Skip to content

Commit

Permalink
added _bp_delete command
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry Pierson committed Apr 8, 2009
1 parent e31fcf5 commit 68db593
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ipydbg.py
Expand Up @@ -443,6 +443,24 @@ def _bp_list(self, keyinfo):
print " %d. %s:%d %s" % (i+1, sp.doc.URL, sp.start_line, state)
return False

@inputcmd(_breakpointcmds, ConsoleKey.X)
def _bp_delete(self, keyinfo):
try:
bp_num = int(Console.ReadLine())
for i, bp in enumerate(self.active_appdomain.Breakpoints):
if i+1 == bp_num:
#CorAppDomain.Breakpoints only iterates over *Active* breakpoints
#to support Active and Deactive BPs, I'll need to keep my own list
#for now, treat BP deactivate as BP Delete
bp.Activate(False)
print "\nBreakpoint %d Deleted" % bp_num
return False
raise Exception, "Breakpoint %d not found" % bp_num

except Exception, msg:
with CC.Red: print "Delete breakpoint Failed", msg
return False

@inputcmd(_inputcmds, ConsoleKey.B)
def _input_breakpoint(self, keyinfo):
keyinfo2 = Console.ReadKey()
Expand Down

0 comments on commit 68db593

Please sign in to comment.