Implement Restoring Breakpoints in Subprocess Debugger

M Debugger.py
M EditorWindow.py
M PyShell.py

0. Polish PyShell.linecache_checkcache()
1. Move break clearing code to PyShell.PyShellEditorWindow from
   EditorWindow.
2. Add PyShellEditorWindow.breakpoints attribute to __init__, a list of
   line numbers which are breakpoints for that edit window.
3. Remove the code in Debugger which removes all module breakpoints when
   debugger is closed.  Want to be able to reload into debugger when
   restarted.
4. Moved the code which sets EditorWindow.text breakpoints from Debugger
   to PyShell.PyShellEditorWindow and refactored.
5. Implement reloading subprocess debugger with breakpoints from all open
   PyShellEditorWindows when debugger is opened or subprocess restarted.
6. Eliminate the break_set attribute, use the breakpoint list instead.
This commit is contained in:
Kurt B. Kaiser 2002-10-23 04:48:08 +00:00
parent 88f015dc88
commit 45186c4ce0
3 changed files with 109 additions and 73 deletions

View file

@ -58,7 +58,6 @@ class EditorWindow:
self.top.instanceDict=flist.inversedict
self.recentFilesPath=os.path.join(idleConf.GetUserCfgDir(),
'recent-files.lst')
self.break_set = False
self.vbar = vbar = Scrollbar(top, name='vbar')
self.text_frame = text_frame = Frame(top)
self.text = text = Text(text_frame, name='text', padx=5, wrap='none',
@ -625,9 +624,6 @@ class EditorWindow:
if not self.get_saved():
title = "*%s*" % title
icon = "*%s" % icon
if self.break_set:
shell = self.flist.pyshell
shell.interp.debugger.clear_file_breaks(self)
self.top.wm_title(title)
self.top.wm_iconname(icon)
@ -696,9 +692,6 @@ class EditorWindow:
#print self.io.filename
if self.io.filename:
self.UpdateRecentFilesList(newFile=self.io.filename)
if self.break_set:
shell = self.flist.pyshell
shell.interp.debugger.clear_file_breaks(self)
WindowList.unregister_callback(self.postwindowsmenu)
if self.close_hook:
self.close_hook()