class_docstr: Magics related to code execution, debugging, profiling, etc.
  
      
docstr: Control the automatic calling of the pdb interactive debugger.
  
  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.
docstr_tok: ["Control","the","automatic","calling","of","the","pdb","interactive","debugger",".","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","."]
code: def pdb(self, parameter_s=""):
      """Control the automatic calling of the pdb interactive debugger.
  
      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."""
  
      par = parameter_s.strip().lower()
  
      if par:
          try:
              new_pdb = {"off": 0, "0": 0, "on": 1, "1": 1}[par]
          except KeyError:
              print(
                  "Incorrect argument. Use on/1, off/0, "
                  "or nothing for a toggle."
              )
              return
      else:
          # toggle
          new_pdb = not self.shell.call_pdb
  
      # set on the shell
      self.shell.call_pdb = new_pdb
      print("Automatic pdb calling has been turned", on_off(new_pdb))
  
imports: from __future__ import print_function
  from __future__ import absolute_import
  import ast
  import bdb
  import gc
  import itertools
  import os
  import sys
  import time
  import timeit
  from pdb import Restart
  from IPython.core import oinspect
  from IPython.core import magic_arguments
  from IPython.core import page
  from IPython.core.error import UsageError
  from IPython.core.macro import Macro
  from IPython.core.magic import Magics, magics_class, line_magic, cell_magic, line_cell_magic, on_off, needs_local_scope
  from IPython.testing.skipdoctest import skip_doctest
  from IPython.utils import py3compat
  from IPython.utils.py3compat import builtin_mod, iteritems, PY3
  from IPython.utils.contexts import preserve_keys
  from IPython.utils.capture import capture_output
  from IPython.utils.ipstruct import Struct
  from IPython.utils.module_paths import find_mod
  from IPython.utils.path import get_py_filename, shellglob
  from IPython.utils.timing import clock, clock2
  from warnings import warn
  from logging import error
label_desc: Use image node_id 5 for calling the ExecutionMagics obj's underlying member method code with example usage: obj.pdb(parameter_s) without return types