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

pdb feature request: Ability to skip standard lib modules and other selected packages/modules #49392

Closed
orsenthil opened this issue Feb 3, 2009 · 3 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@orsenthil
Copy link
Member

BPO 5142
Nosy @birkenfeld, @orsenthil
Files
  • pdb_skip_modules.patch: Patch to skip modules in pdb, with test
  • 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 = 'https://github.com/birkenfeld'
    closed_at = <Date 2009-05-05.08:54:53.507>
    created_at = <Date 2009-02-03.13:51:47.673>
    labels = ['type-feature', 'library']
    title = 'pdb feature request: Ability to skip standard lib modules and other selected packages/modules'
    updated_at = <Date 2009-05-05.08:54:53.505>
    user = 'https://github.com/orsenthil'

    bugs.python.org fields:

    activity = <Date 2009-05-05.08:54:53.505>
    actor = 'georg.brandl'
    assignee = 'georg.brandl'
    closed = True
    closed_date = <Date 2009-05-05.08:54:53.507>
    closer = 'georg.brandl'
    components = ['Library (Lib)']
    creation = <Date 2009-02-03.13:51:47.673>
    creator = 'orsenthil'
    dependencies = []
    files = ['13587']
    hgrepos = []
    issue_num = 5142
    keywords = ['patch']
    message_count = 3.0
    messages = ['81058', '85262', '87228']
    nosy_count = 4.0
    nosy_names = ['georg.brandl', 'orsenthil', 'LambertDW', 'maru']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue5142'
    versions = ['Python 2.6', 'Python 3.0', 'Python 3.1', 'Python 2.7']

    @orsenthil
    Copy link
    Member Author

    When using the python debugger, most often I step ('s') through the
    code base and I often Call the standard library modules, whichever are
    imported in the scripts.
    This is often not desirable as I know that errors are within my modules
    and not in standard library.
    Two things which a developer can do while using pdb is:

    1. Be careful as not to 's' into stdlib but use next 'n'.
    2. If accidentally stepped into, then use return 'r'.

    Instead of doing this repeatedly, how about having method in the
    debugger to skip certain modules ( like standard library modules,
    certain package's modules etc)

    This would save a lot of distraction in call and returns, and developers
    can just go ahead with 's' and Enters.

    @orsenthil orsenthil added type-feature A feature request or enhancement stdlib Python modules in the Lib dir labels Feb 3, 2009
    @maru
    Copy link
    Mannequin

    maru mannequin commented Apr 2, 2009

    Added a skip keyword argument to Bdb and Pdb class constructors to allow
    skipping of modules based on a list of glob-style matches (see fnmatch),
    as per the following example:

    import pdb;Pdb(skip=['django.command*']).set_trace()

    @birkenfeld birkenfeld self-assigned this Apr 4, 2009
    @birkenfeld
    Copy link
    Member

    Applied the patch, added documentation and committed it as r72322. Thanks!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 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 type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants