Message242861
>>> import pdb, test3
>>> pdb.run("reload(test3)")
> <string>(1)<module>()
(Pdb) s
--Call--
> c:\documents and settings\perry\desktop\coding_projects\python\test3.py(1)<module>()
-> foo = 7789
(Pdb) b 2
Breakpoint 1 at c:\documents and settings\perry\desktop\coding_projects\python\test3.py:2
(Pdb) c
> c:\documents and settings\perry\desktop\coding_projects\python\test3.py(2)<module>()
-> bar = 7788
(Pdb) c
>>> pdb.run("reload(test3)")
> <string>(1)<module>()
(Pdb) s
--Call--
> c:\documents and settings\perry\desktop\coding_projects\python\test3.py(1)<module>()
-> foo = 7789
(Pdb) b 1
Breakpoint 2 at c:\documents and settings\perry\desktop\coding_projects\python\test3.py:1
(Pdb) cl 1
Traceback (most recent call last):
File "<pyshell#592>", line 1, in <module>
pdb.run("reload(test3)")
File "C:\Python27\lib\pdb.py", line 1238, in run
Pdb().run(statement, globals, locals)
File "C:\Python27\lib\bdb.py", line 400, in run
exec cmd in globals, locals
File "<string>", line 1, in <module>
File "test3.py", line 1, in <module>
foo = 7789
File "C:\Python27\lib\bdb.py", line 51, in trace_dispatch
return self.dispatch_call(frame, arg)
File "C:\Python27\lib\bdb.py", line 80, in dispatch_call
self.user_call(frame, arg)
File "C:\Python27\lib\pdb.py", line 148, in user_call
self.interaction(frame, None)
File "C:\Python27\lib\pdb.py", line 210, in interaction
self.cmdloop()
File "C:\Python27\lib\cmd.py", line 142, in cmdloop
stop = self.onecmd(line)
File "C:\Python27\lib\pdb.py", line 279, in onecmd
return cmd.Cmd.onecmd(self, line)
File "C:\Python27\lib\cmd.py", line 221, in onecmd
return func(arg)
File "C:\Python27\lib\pdb.py", line 622, in do_clear
err = self.clear_bpbynumber(i)
File "C:\Python27\lib\bdb.py", line 297, in clear_bpbynumber
self._prune_breaks(bp.file, bp.line)
File "C:\Python27\lib\bdb.py", line 268, in _prune_breaks
self.breaks[filename].remove(lineno)
ValueError: list.remove(x): x not in list
Running the same code without first defining a breakpoint (in the second debugger instance) raises KeyError: [path to test3.py] on the same lien
The contents of test3.py are irrelevant, as long as it is at least two lines long and syntactically correct. |
|
Date |
User |
Action |
Args |
2015-05-10 16:30:17 | ppperry | set | recipients:
+ ppperry, georg.brandl |
2015-05-10 16:30:16 | ppperry | set | messageid: <1431275416.99.0.134014878289.issue24160@psf.upfronthosting.co.za> |
2015-05-10 16:30:16 | ppperry | link | issue24160 messages |
2015-05-10 16:30:16 | ppperry | create | |
|