Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for bug 1055168 (pdb not entering the right frame) #41131

Closed
isandler mannequin opened this issue Nov 7, 2004 · 3 comments
Closed

fix for bug 1055168 (pdb not entering the right frame) #41131

isandler mannequin opened this issue Nov 7, 2004 · 3 comments
Labels
stdlib Python modules in the Lib dir

Comments

@isandler
Copy link
Mannequin

isandler mannequin commented Nov 7, 2004

BPO 1061767
Files
  • pdb.patch3
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2004-11-07.11:37:58.000>
    created_at = <Date 2004-11-07.04:26:18.000>
    labels = ['library']
    title = 'fix for bug 1055168 (pdb not entering the right frame)'
    updated_at = <Date 2004-11-07.11:37:58.000>
    user = 'https://bugs.python.org/isandler'

    bugs.python.org fields:

    activity = <Date 2004-11-07.11:37:58.000>
    actor = 'jlgijsbers'
    assignee = 'none'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2004-11-07.04:26:18.000>
    creator = 'isandler'
    dependencies = []
    files = ['6341']
    hgrepos = []
    issue_num = 1061767
    keywords = ['patch']
    message_count = 3.0
    messages = ['47219', '47220', '47221']
    nosy_count = 2.0
    nosy_names = ['isandler', 'jlgijsbers']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1061767'
    versions = []

    @isandler
    Copy link
    Mannequin Author

    isandler mannequin commented Nov 7, 2004

    Bdb.set_trace() assumed that the frame which needs to
    be debugged is the caller's frame. This assumption
    fails if Bdb_set_trace() is called from inside a
    debugger (say from inside of a pdb's set_trace). So now
    Bdb.set_trace() accepts an optional parameter
    frame_to_debug which allows the caller to specify which
    frame needs to be debugged, and pdb is modified to use it..

    @isandler isandler mannequin closed this as completed Nov 7, 2004
    @isandler isandler mannequin added the stdlib Python modules in the Lib dir label Nov 7, 2004
    @isandler isandler mannequin closed this as completed Nov 7, 2004
    @isandler isandler mannequin added the stdlib Python modules in the Lib dir label Nov 7, 2004
    @isandler
    Copy link
    Mannequin Author

    isandler mannequin commented Nov 7, 2004

    Logged In: YES
    user_id=971153

    The original bug report gives an example where the code to
    debug was specified from python's shell. I am not quite how
    pdb is supposed to behave in this case.. With the patch, it
    does seem to enter in the right frame, but it can't list the
    code.

    The patch does work when the code comes from a file.

    .def foo():
    import pdb
    pdb.set_trace()
    print "tracing 1"
    print "tracing 2"
    foo()

    @jlgijsbers
    Copy link
    Mannequin

    jlgijsbers mannequin commented Nov 7, 2004

    Logged In: YES
    user_id=469548

    That's normal: pdb can never list code that was input on a
    console. A coworker of mine (Jeroen Vloothuis) and I
    beautified the code a bit, and I checked it in as rev 1.73
    of pdb.py and rev 1.47 of bdb.py. Thanks for the patch!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants