From 669f4c3850eaaf4e00a79032ef960a79e6ca6ad7 Mon Sep 17 00:00:00 2001 From: "Kurt B. Kaiser" Date: Thu, 20 Jun 2002 04:01:47 +0000 Subject: 1. Debugger Breakpoints, finish implementation 2. Debugger Clear Breakpoints, implement 3. Nice yellow breakpoints for Chui :) --- Lib/idlelib/PyShell.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Lib/idlelib/PyShell.py') diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index d84e2e1bd6..f418a5757e 100644 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -96,10 +96,13 @@ class PyShellEditorWindow(EditorWindow): def __init__(self, *args): apply(EditorWindow.__init__, (self,) + args) self.text.bind("<>", self.set_breakpoint_here) + self.text.bind("<>", + self.clear_breakpoint_here) self.text.bind("<>", self.flist.open_shell) rmenu_specs = [ - ("Set breakpoint here", "<>"), + ("Set Breakpoint", "<>"), + ("Clear Breakpoint", "<>") ] def set_breakpoint_here(self, event=None): @@ -108,6 +111,12 @@ class PyShellEditorWindow(EditorWindow): return self.flist.pyshell.interp.debugger.set_breakpoint_here(self) + def clear_breakpoint_here(self, event=None): + if not self.flist.pyshell or not self.flist.pyshell.interp.debugger: + self.text.bell() + return + self.flist.pyshell.interp.debugger.clear_breakpoint_here(self) + class PyShellFileList(FileList): -- cgit v1.2.1