You are viewing an older version (9.11.0). Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.11.0 / IPython / core / magics / execution / ExecutionMagics / pdb

function

IPython.core.magics.execution:ExecutionMagics.pdb

source: /IPython/core/magics/execution.py :403

Signature

def   pdb ( self parameter_s = '' )

Summary

Control the automatic calling of the pdb interactive debugger.

Extended Summary

Call as '%pdb on', '%pdb 1', '%pdb off' or '%pdb 0'. If called without argument it works as a toggle.

When an exception is triggered, IPython can optionally call the interactive pdb debugger after the traceback printout. %pdb toggles this feature on and off.

The initial state of this feature is set in your configuration file (the option is InteractiveShell.pdb).

If you want to just activate the debugger AFTER an exception has fired, without having to type '%pdb on' and rerunning your code, you can use the %debug magic.

Aliases

  • IPython.core.magics.ExecutionMagics.pdb