gotcha / ipdb

Integration of IPython pdb
BSD 3-Clause "New" or "Revised" License
1.85k stars 146 forks source link

How to use ipdb to skip/blackbox 3rd-party scripts/frames? #182

Open snowman opened 4 years ago

snowman commented 4 years ago

py2: class pdb.Pdb(completekey='tab', stdin=None, stdout=None, skip=None) py3: class pdb.Pdb(completekey='tab', stdin=None, stdout=None, skip=None, nosigint=False, readrc=True

The skip argument, if given, must be an iterable of glob-style module name patterns. The debugger will not step into frames that originate in a module that matches one of these patterns.

Example call to enable tracing with skip: import pdb; pdb.Pdb(skip=['django.*']).set_trace()

Whether a frame is considered to originate in a certain module is determined by > the name in the frame globals.

Term

gotcha commented 4 years ago

I guess a PR would be welcome. It should extend _init_pdb to accept skip argument.