1.4 The ``Basic'' Debugger module (bdb) and Classes Bdb and Breakpoint

As mentioned in the previous section the Pdb class is really an inheritance of two other classes, Cmd and Bdb. While the Cmd class handles command-like interaction, the Bdb handles basic debugger functions. It is the meat of this debugger or any debugger. Thus, you will find other debuggers such as Eric or Idle using the bdb module (not pdb or pydb).

The module defines an exception used for quitting the debugger BdbQuit. It defines two other classes: Bdb, basic debugger routines, and Breakpoint a class for handling debugger breakpoints.

class Bdb( )

canonic( filename)
Regularizes or canonicalizes filename in some sort of standard form. This may involve regularizing the case of letters, using the absolute pathname

reset( )
The debugger keeps track of frames it needs to stop at. This routine resets this information so that no frames are recorded as places to enter the debugger.

trace_dispatch( )
This gets called on every debugger event and reroutes or dispatches the call based on the event. Events are described in the next section 1.5.

dispatch_exception( )
Called from trace_dispatch on an ``exception'' event. Generally you don't change this but instead override user_exception.

dispatch_line( )
Called from trace_dispatch on an ``line'' event. Generally you don't change this but instead override user_line.

dispatch_return( )
Called from trace_dispatch on an ``return event. Generally you don't change this but instead override user_return.

user_exception( )
Called on an ``exception'' event. Debuggers may override this method.

user_line( )
Called on a ``line'' event. Debuggers may override this method.

user_return( )
Called on a ``return'' event. Debuggers may override this method.

See About this document... for information on suggesting changes.