mirror of
https://github.com/python/cpython.git
synced 2025-10-27 19:54:38 +00:00
Clear associated breakpoints when closing an edit window.
M Debugger.py : Added clear_file_breaks()
M EditorWindow.py : Clear breaks when closed, commments->docstrings,
comment out some debugging print statements
M PyShell.py : comments->docstrings ; clarify extending EditorWindow
methods.
M RemoteDebugger.py: Add clear_all_file_breaks() functionality,
clarify some comments.
This commit is contained in:
parent
ab5dae35ca
commit
83118c6cb3
4 changed files with 78 additions and 66 deletions
|
|
@ -320,17 +320,27 @@ def set_breakpoint_here(self, edit):
|
|||
text.tag_add("BREAK", "insert linestart", "insert lineend +1char")
|
||||
|
||||
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")
|
||||
|
||||
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")
|
||||
|
||||
def clear_file_breaks(self, edit):
|
||||
text = edit.text
|
||||
filename = edit.io.filename
|
||||
if not filename:
|
||||
text.bell()
|
||||
return
|
||||
msg = self.idb.clear_all_file_breaks(filename)
|
||||
if msg:
|
||||
text.bell()
|
||||
return
|
||||
text.tag_delete("BREAK")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue