Python pdb bug, followed by bug in bugs.python.org
Ian Kelly
ian.g.kelly at gmail.com
Thu Apr 11 13:41:28 EDT 2013
On Thu, Apr 11, 2013 at 8:56 AM, <donaldcallen at gmail.com> wrote:
> #! /usr/bin/env python3
> import pdb
> def foo(message):
> print(message)
> pdb.set_trace()
> foo('first call')
> foo('second call')
>
> Stick this in an file with execute permission and run it. At the first breakpoint, the backtrace will be correct. Continue. At the second breakpoint, a backtrace will show the foo('first call') on the stack when, in fact, the call came from foo('second call'), as verified by the printed message.
This is what I get using Python 3.3.1 in Windows:
C:\Users\ikelly\Desktop>c:\python33\python python_bug.py
first call
--Return--
> c:\users\ikelly\desktop\python_bug.py(7)foo()->None
-> pdb.set_trace()
(Pdb) c
second call
--Return--
> c:\users\ikelly\desktop\python_bug.py(7)foo()->None
-> pdb.set_trace()
(Pdb) c
More information about the Python-list
mailing list