mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
1. Debugger Breakpoints, finish implementation
2. Debugger Clear Breakpoints, implement 3. Nice yellow breakpoints for Chui :)
This commit is contained in:
parent
3875e90274
commit
669f4c3850
4 changed files with 79 additions and 27 deletions
|
@ -52,7 +52,6 @@ class Idb(bdb.Bdb):
|
|||
|
||||
class Debugger:
|
||||
|
||||
# interacting = 0 # XXX KBK 14Jun02 move to __init__
|
||||
vstack = vsource = vlocals = vglobals = None
|
||||
|
||||
def __init__(self, pyshell, idb=None):
|
||||
|
@ -157,7 +156,6 @@ class Debugger:
|
|||
if self.vglobals.get():
|
||||
self.show_globals()
|
||||
|
||||
# frame = None # XXX KBK 14Jun02 Move to __init__
|
||||
|
||||
def interaction(self, message, frame, info=None):
|
||||
self.frame = frame
|
||||
|
@ -321,16 +319,18 @@ class Debugger:
|
|||
return
|
||||
text.tag_add("BREAK", "insert linestart", "insert lineend +1char")
|
||||
|
||||
# A literal copy of Bdb.set_break() without the print statement at the end
|
||||
#def set_break(self, filename, lineno, temporary=0, cond = None):
|
||||
# import linecache # Import as late as possible
|
||||
# filename = self.canonic(filename)
|
||||
# line = linecache.getline(filename, lineno)
|
||||
# if not line:
|
||||
# return 'That line does not exist!'
|
||||
# if not self.breaks.has_key(filename):
|
||||
# self.breaks[filename] = []
|
||||
# list = self.breaks[filename]
|
||||
# if not lineno in list:
|
||||
# list.append(lineno)
|
||||
# bp = bdb.Breakpoint(filename, lineno, temporary, cond)
|
||||
def clear_breakpoint_here(self, edit):
|
||||
text = edit.text
|
||||
filename = edit.io.filename
|
||||
if not filename:
|
||||
text.bell()
|
||||
return
|
||||
lineno = int(float(text.index("insert")))
|
||||
msg = self.idb.clear_break(filename, lineno)
|
||||
if msg:
|
||||
text.bell()
|
||||
return
|
||||
text.tag_remove("BREAK", "insert linestart",\
|
||||
"insert lineend +1char")
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue