[Idle-dev] CVS: idle PyShell.py,1.31,1.32 Debugger.py,1.14,1.15
Chui Tey
teyc@users.sourceforge.net
Mon, 04 Nov 2002 15:39:47 -0800
Update of /cvsroot/idlefork/idle
In directory usw-pr-cvs1:/tmp/cvs-serv23340
Modified Files:
PyShell.py Debugger.py
Log Message:
Set breakpoints on remote debugger
Index: PyShell.py
===================================================================
RCS file: /cvsroot/idlefork/idle/PyShell.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** PyShell.py 4 Nov 2002 22:14:54 -0000 1.31
--- PyShell.py 4 Nov 2002 23:39:45 -0000 1.32
***************
*** 85,89 ****
# whenever a file is changed, restore breakpoints
if self.io.filename: self.restore_file_breaks()
! def filename_changed_hook(self,old_hook=self.io.filename_change_hook):
self.restore_file_breaks()
old_hook()
--- 85,89 ----
# whenever a file is changed, restore breakpoints
if self.io.filename: self.restore_file_breaks()
! def filename_changed_hook(old_hook=self.io.filename_change_hook,self=self):
self.restore_file_breaks()
old_hook()
***************
*** 162,166 ****
if not line.startswith(filename+"="):
new_file.write(line)
! new_file.write(filename+"="+`self.get_current_breaks()`)
new_file.close()
--- 162,166 ----
if not line.startswith(filename+"="):
new_file.write(line)
! new_file.write(filename+"="+`self.get_current_breaks()`+"\n")
new_file.close()
***************
*** 168,177 ****
self.text.update() # this enables setting "BREAK" tags to be visible
filename=self.io.filename
! lines=open(self.breakpointPath,"r").readlines()
! for line in lines:
! if line.startswith(filename+"="):
! breakpoint_linenumbers=eval(line[len(filename)+1:])
! for breakpoint_linenumber in breakpoint_linenumbers:
! self.set_breakpoint(breakpoint_linenumber)
def get_current_breaks(self):
--- 168,178 ----
self.text.update() # this enables setting "BREAK" tags to be visible
filename=self.io.filename
! if os.path.isfile(self.breakpointPath):
! lines=open(self.breakpointPath,"r").readlines()
! for line in lines:
! if line.startswith(filename+"="):
! breakpoint_linenumbers=eval(line[len(filename)+1:])
! for breakpoint_linenumber in breakpoint_linenumbers:
! self.set_breakpoint(breakpoint_linenumber)
def get_current_breaks(self):
Index: Debugger.py
===================================================================
RCS file: /cvsroot/idlefork/idle/Debugger.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** Debugger.py 23 Oct 2002 04:48:08 -0000 1.14
--- Debugger.py 4 Nov 2002 23:39:45 -0000 1.15
***************
*** 331,335 ****
filename = editwin.io.filename
try:
! for lineno in editwin.breakpoints:
self.set_breakpoint_here(filename, lineno)
except AttributeError:
--- 331,335 ----
filename = editwin.io.filename
try:
! for lineno in editwin.get_current_breaks():
self.set_breakpoint_here(filename, lineno)
except AttributeError: