This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author petr.viktorin
Recipients petr.viktorin
Date 2009-02-17.12:06:19
SpamBayes Score 6.13813e-08
Marked as misclassified No
Message-id <1234872382.19.0.923114803335.issue5294@psf.upfronthosting.co.za>
In-reply-to
Content
It doesn't matter whether the breakpoint is set from within a function
or not, but only the module-level frame is affected.

import pdb

def test():
    print ("At line 4")
    print ("At line 5")
    print ("At line 6")
    print ("At line 7")

pdb.set_trace()

print ("At line 11")
print ("At line 12")
test()
print ("At line 13")
print ("At line 14")

$ python pdbfail.py
> /home/petr/tmp/pdbfail.py(11)<module>()
-> print ("At line 11")

...[single-step to line 4]...

> /home/petr/tmp/pdbfail.py(4)test()
-> print ("At line 4")
(Pdb) b 14
Breakpoint 1 at /home/petr/tmp/pdbfail.py:14
(Pdb) c
At line 4
At line 5
At line 6
At line 7
> /home/petr/tmp/pdbfail.py(14)<module>()
-> print ("At line 13")
(Pdb) c
At line 13
> /home/petr/tmp/pdbfail.py(15)<module>()
-> print ("At line 14")
(Pdb) c
At line 14
--Return--
> /home/petr/tmp/pdbfail.py(15)<module>()->None
-> print ("At line 14")
(Pdb) c
History
Date User Action Args
2009-02-17 12:06:22petr.viktorinsetrecipients: + petr.viktorin
2009-02-17 12:06:22petr.viktorinsetmessageid: <1234872382.19.0.923114803335.issue5294@psf.upfronthosting.co.za>
2009-02-17 12:06:20petr.viktorinlinkissue5294 messages
2009-02-17 12:06:20petr.viktorincreate