FAQ
I'm pretty new to Python, but I am really enjoying it as an alternative
to Perl and PHP.

When I run the debugger [import pdb; pdb.set_trace()] and then do next
and step, and evaluate variables, etc, when I hit 'c' for continue, we
go to the end, just fine.

As soon as I set a breakpoint down the line, [b <line number>] the
behavior of 'c' changes. Instead of continuing until the breakpoint, or
until the end, if the breakpoint is hidden by a conditional, the
debugger starts to treat 'c' as a step (or a next, I'm not sure which.)

This behavior is repeatable and consistent.

I see this in python 2.6.4 on Ubuntu 9.10 and also in 2.5.2 on Ubuntu
8.04 (Hardy), both using the installed packages.

I must be missing something. Assistance will be welcome.

Thanks,

Ed Greenberg

Search Discussions

  • Thomas Jollans at Sep 15, 2010 at 7:04 pm

    On Wednesday 15 September 2010, it occurred to Ed Greenberg to exclaim:
    I'm pretty new to Python, but I am really enjoying it as an alternative
    to Perl and PHP.

    When I run the debugger [import pdb; pdb.set_trace()] and then do next
    and step, and evaluate variables, etc, when I hit 'c' for continue, we
    go to the end, just fine.

    As soon as I set a breakpoint down the line, [b <line number>] the
    behavior of 'c' changes. Instead of continuing until the breakpoint, or
    until the end, if the breakpoint is hidden by a conditional, the
    debugger starts to treat 'c' as a step (or a next, I'm not sure which.)

    This behavior is repeatable and consistent.

    I see this in python 2.6.4 on Ubuntu 9.10 and also in 2.5.2 on Ubuntu
    8.04 (Hardy), both using the installed packages.

    I must be missing something. Assistance will be welcome.
    I can't reproduce this. Please post a small script and debugger session
    transcript that illustrate the problem clearly.

    Maybe, on the way, you'll discover something you'd been missing. Maybe someone
    here will be able to help you then (maybe someone is now, but not me...).
    Maybe it's a bug (which it would be, if it behaves as you describe, but as I
    said, it appears to work for me).
  • Ed Greenberg at Sep 15, 2010 at 10:17 pm

    On 09/15/2010 02:04 PM, Thomas Jollans wrote:
    On Wednesday 15 September 2010, it occurred to Ed Greenberg to exclaim:
    I'm pretty new to Python, but I am really enjoying it as an alternative
    to Perl and PHP.

    When I run the debugger [import pdb; pdb.set_trace()] and then do next
    and step, and evaluate variables, etc, when I hit 'c' for continue, we
    go to the end, just fine.

    As soon as I set a breakpoint down the line, [b<line number>] the
    behavior of 'c' changes. Instead of continuing until the breakpoint, or
    until the end, if the breakpoint is hidden by a conditional, the
    debugger starts to treat 'c' as a step (or a next, I'm not sure which.)

    This behavior is repeatable and consistent.

    I see this in python 2.6.4 on Ubuntu 9.10 and also in 2.5.2 on Ubuntu
    8.04 (Hardy), both using the installed packages.

    I must be missing something. Assistance will be welcome.
    I can't reproduce this. Please post a small script and debugger session
    transcript that illustrate the problem clearly.

    Maybe, on the way, you'll discover something you'd been missing. Maybe someone
    here will be able to help you then (maybe someone is now, but not me...).
    Maybe it's a bug (which it would be, if it behaves as you describe, but as I
    said, it appears to work for me).
    Here is my debugger session as requested. Note that I set a breakpoint
    at line 7, but c still stops at lines 4, 5 and 6. I hope somebody can
    explain this.
    -------------------------------------------------
    root at cloud4:~# python --version
    Python 2.6.4
    root at cloud4:~# python test.py
    /root/test.py(3)<module>()
    -> a=1
    (Pdb) l
    1 #!/usr/bin/python
    2 import pdb;pdb.set_trace()
    3 -> a=1
    4 b=2
    5 c=3
    6 d=4
    7 print a,b,c,d
    8
    [EOF]
    (Pdb) b 7
    Breakpoint 1 at /root/test.py:7
    (Pdb) c
    /root/test.py(4)<module>()
    -> b=2
    (Pdb) c
    /root/test.py(5)<module>()
    -> c=3
    (Pdb) c
    /root/test.py(6)<module>()
    -> d=4
    (Pdb) c
    /root/test.py(7)<module>()
    -> print a,b,c,d
    (Pdb) c
    1 2 3 4
    --Return--
    /root/test.py(7)<module>()->None
    -> print a,b,c,d
    (Pdb) c
    root at cloud4:~#
  • Danny Levinson at Sep 28, 2010 at 12:07 am
    Does this describe the problem you are having?

    http://bugs.python.org/issue5294
  • Lie Ryan at Sep 17, 2010 at 4:58 pm

    On 09/16/10 03:38, Ed Greenberg wrote:
    I'm pretty new to Python, but I am really enjoying it as an alternative
    to Perl and PHP.

    When I run the debugger [import pdb; pdb.set_trace()] and then do next
    and step, and evaluate variables, etc, when I hit 'c' for continue, we
    go to the end, just fine.

    As soon as I set a breakpoint down the line, [b <line number>] the
    behavior of 'c' changes. Instead of continuing until the breakpoint, or
    until the end, if the breakpoint is hidden by a conditional, the
    debugger starts to treat 'c' as a step (or a next, I'm not sure which.)

    This behavior is repeatable and consistent.
    can you write a test script and post its corresponding gdb session that
    demonstrates what you meant?

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedSep 15, '10 at 5:38p
activeSep 28, '10 at 12:07a
posts5
users4
websitepython.org

People

Translate

site design / logo © 2022 Grokbase