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.

classification
Title: pdb feature request: Ability to skip standard lib modules and other selected packages/modules
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.0, Python 3.1, Python 2.7, Python 2.6
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: LambertDW, georg.brandl, maru, orsenthil
Priority: normal Keywords: patch

Created on 2009-02-03 13:51 by orsenthil, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pdb_skip_modules.patch maru, 2009-04-02 20:20 Patch to skip modules in pdb, with test
Messages (3)
msg81058 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2009-02-03 13:51
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.
msg85262 - (view) Author: Maru Newby (maru) * Date: 2009-04-02 20:20
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()
msg87228 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-05-05 08:54
Applied the patch, added documentation and committed it as r72322. Thanks!
History
Date User Action Args
2022-04-11 14:56:45adminsetgithub: 49392
2009-05-05 08:54:53georg.brandlsetstatus: open -> closed
resolution: accepted
messages: + msg87228
2009-04-04 15:50:59georg.brandlsetassignee: georg.brandl

nosy: + georg.brandl
2009-04-02 20:20:19marusetfiles: + pdb_skip_modules.patch

nosy: + maru
messages: + msg85262

keywords: + patch
2009-02-03 16:57:27LambertDWsetnosy: + LambertDW
2009-02-03 13:52:47orsenthilsetcomponents: + Library (Lib)
2009-02-03 13:51:47orsenthilcreate