Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(15)

Side by Side Diff: Lib/idlelib/PyShell.py

Issue 14105: Breakpoints in debug lost if line is inserted; IDLE
Patch Set: Created 5 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #! /usr/bin/env python3 1 #! /usr/bin/env python3
2 2
3 import getopt 3 import getopt
4 import os 4 import os
5 import os.path 5 import os.path
6 import re 6 import re
7 import socket 7 import socket
8 import subprocess 8 import subprocess
9 import sys 9 import sys
10 import threading 10 import threading
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 # XXX 13 Dec 2002 KBK Currently the file must be saved before it can 220 # XXX 13 Dec 2002 KBK Currently the file must be saved before it can
221 # be run. The breaks are saved at that time. If we introduce 221 # be run. The breaks are saved at that time. If we introduce
222 # a temporary file save feature the save breaks functionality 222 # a temporary file save feature the save breaks functionality
223 # needs to be re-verified, since the breaks at the time the 223 # needs to be re-verified, since the breaks at the time the
224 # temp file is created may differ from the breaks at the last 224 # temp file is created may differ from the breaks at the last
225 # permanent save of the file. Currently, a break introduced 225 # permanent save of the file. Currently, a break introduced
226 # after a save will be effective, but not persistent. 226 # after a save will be effective, but not persistent.
227 # This is necessary to keep the saved breaks synched with the 227 # This is necessary to keep the saved breaks synched with the
228 # saved file. 228 # saved file.
229 # 229 #
230 # Breakpoints are set as tagged ranges in the text. Certain 230 # Breakpoints are set as tagged ranges in the text.
231 # kinds of edits cause these ranges to be deleted: Inserting 231 # Since a modified file has to be saved before it is
232 # or deleting a line just before a breakpoint, and certain
233 # deletions prior to a breakpoint. These issues need to be
234 # investigated and understood. It's not clear if they are
235 # Tk issues or IDLE issues, or whether they can actually
236 # be fixed. Since a modified file has to be saved before it is
237 # run, and since self.breakpoints (from which the subprocess 232 # run, and since self.breakpoints (from which the subprocess
238 # debugger is loaded) is updated during the save, the visible 233 # debugger is loaded) is updated during the save, the visible
239 # breaks stay synched with the subprocess even if one of these 234 # breaks stay synched with the subprocess even if one of these
240 # unexpected breakpoint deletions occurs. 235 # unexpected breakpoint deletions occurs.
241 breaks = self.breakpoints 236 breaks = self.breakpoints
242 filename = self.io.filename 237 filename = self.io.filename
243 try: 238 try:
244 with open(self.breakpointPath, "r") as fp: 239 with open(self.breakpointPath, "r") as fp:
245 lines = fp.readlines() 240 lines = fp.readlines()
246 except OSError: 241 except OSError:
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1611 while flist.inversedict: # keep IDLE running while files are open. 1606 while flist.inversedict: # keep IDLE running while files are open.
1612 root.mainloop() 1607 root.mainloop()
1613 root.destroy() 1608 root.destroy()
1614 capture_warnings(False) 1609 capture_warnings(False)
1615 1610
1616 if __name__ == "__main__": 1611 if __name__ == "__main__":
1617 sys.modules['PyShell'] = sys.modules['__main__'] 1612 sys.modules['PyShell'] = sys.modules['__main__']
1618 main() 1613 main()
1619 1614
1620 capture_warnings(False) # Make sure turned off; see issue 18081 1615 capture_warnings(False) # Make sure turned off; see issue 18081
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+