[New-bugs-announce] [issue6126] Python 3 pdb: shows internal code, breakpoints don't work

Eric Promislow report at bugs.python.org
Wed May 27 21:15:07 CEST 2009


New submission from Eric Promislow <ericp at activestate.com>:

I have a simple test file, test01.py, with this output:
$ cat test01.py
#!/usr/bin/env python

print("Line 1")
print("Line 2")
print("Line 3")
$
$ # Now try debugging it.
$ python3.0 -mpdb test01.py
--Return--
> /home/ericp/opt/Python-3.0.1/lib/python3.0/io.py(762)closed()->False
-> return self.raw.closed
(Pdb) b test01.py:4
Breakpoint 1 at /home/ericp/lab/Python-3.0.1/test01.py:5
(Pdb) r
--Return--
> /home/ericp/opt/Python-3.0.1/lib/python3.0/io.py(1471)closed()->False
-> return self.buffer.closed
(Pdb) c
line 1
line 2
line 3
The program finished and will be restarted

Two main problems:

1. I shouldn't see the code for io.py

2. The program doesn't stop at the breakpoint, because that 
stack frame is exposed to bdb as (file:"<string>", line:4),
not (file:"/home/.../test01.py", line:4).

----------
components: Interpreter Core
messages: 88431
nosy: ericp
severity: normal
status: open
title: Python 3 pdb: shows internal code, breakpoints don't work
type: behavior
versions: Python 3.0

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6126>
_______________________________________


More information about the New-bugs-announce mailing list