class_docstr: DEPRECATED
  
  Class for local debugging, similar to pdb.set_trace.
  
  Instances of this class, when called, behave like pdb.set_trace, but
  providing IPython's enhanced capabilities.
  
  This is implemented as a class which must be initialized in your own code
  and not as a standalone function because we need to detect at runtime
  whether IPython is already active or not.  That detection is done in the
  constructor, ensuring that this code plays nicely with a running IPython,
  while functioning acceptably (though with limitations) if outside of it.
class_docstr_tok: ["DEPRECATED","Class","for","local","debugging",",","similar","to","pdb.set_trace",".","Instances","of","this","class",",","when","called",",","behave","like","pdb.set_trace",",","but","providing","IPython","'s","enhanced","capabilities",".","This","is","implemented","as","a","class","which","must","be","initialized","in","your","own","code","and","not","as","a","standalone","function","because","we","need","to","detect","at","runtime","whether","IPython","is","already","active","or","not",".","That","detection","is","done","in","the","constructor",",","ensuring","that","this","code","plays","nicely","with","a","running","IPython",",","while","functioning","acceptably","(","though","with","limitations",")","if","outside","of","it","."]
docstr: DEPRECATED
  
  Create a local debugger instance.
  
  Parameters
  ----------
  
  colors : str, optional
      The name of the color scheme to use, it must be one of IPython's
      valid color schemes.  If not given, the function will default to
      the current IPython scheme when running inside IPython, and to
      'NoColor' otherwise.
  
  Examples
  --------
  ::
  
      from IPython.core.debugger import Tracer; debug_here = Tracer()
  
  Later in your code::
  
      debug_here()  # -> will open up the debugger at that point.
  
  Once the debugger activates, you can use all of its regular commands to
  step through code, set breakpoints, etc.  See the pdb documentation
  from the Python standard library for usage details.
docstr_tok: ["DEPRECATED","Create","a","local","debugger","instance",".","Parameters","--","--","--","--","--","colors",":","str",",","optional","The","name","of","the","color","scheme","to","use",",","it","must","be","one","of","IPython's","valid","color","schemes",".","If","not","given",",","the","function","will","default","to","the","current","IPython","scheme","when","running","inside","IPython",",","and","to","'NoColor","'","otherwise",".","Examples","--","--","--","--",":",":","from","IPython.core.debugger","import","Tracer",";","debug_here","=","Tracer","(",")","Later","in","your","code",":",":","debug_here","(",")","#","-",">","will","open","up","the","debugger","at","that","point",".","Once","the","debugger","activates",",","you","can","use","all","of","its","regular","commands","to","step","through","code",",","set","breakpoints",",","etc",".","See","the","pdb","documentation","from","the","Python","standard","library","for","usage","details","."]
code: def __init__(self, colors=None):
      """
      DEPRECATED
  
      Create a local debugger instance.
  
      Parameters
      ----------
  
      colors : str, optional
          The name of the color scheme to use, it must be one of IPython's
          valid color schemes.  If not given, the function will default to
          the current IPython scheme when running inside IPython, and to
          'NoColor' otherwise.
  
      Examples
      --------
      ::
  
          from IPython.core.debugger import Tracer; debug_here = Tracer()
  
      Later in your code::
  
          debug_here()  # -> will open up the debugger at that point.
  
      Once the debugger activates, you can use all of its regular commands to
      step through code, set breakpoints, etc.  See the pdb documentation
      from the Python standard library for usage details.
      """
      warnings.warn(
          "`Tracer` is deprecated since version 5.1, directly use "
          "`IPython.core.debugger.Pdb.set_trace()`",
          DeprecationWarning,
          stacklevel=2,
      )
  
      ip = get_ipython()
      if ip is None:
          # Outside of ipython, we set our own exception hook manually
          sys.excepthook = functools.partial(
              BdbQuit_excepthook, excepthook=sys.excepthook
          )
          def_colors = "NoColor"
      else:
          # In ipython, we use its custom exception handler mechanism
          def_colors = ip.colors
          ip.set_custom_exc((bdb.BdbQuit,), BdbQuit_IPython_excepthook)
  
      if colors is None:
          colors = def_colors
  
      # The stdlib debugger internally uses a modified repr from the `repr`
      # module, that limits the length of printed strings to a hardcoded
      # limit of 30 characters.  That much trimming is too aggressive, let's
      # at least raise that limit to 80 chars, which should be enough for
      # most interactive uses.
      try:
          try:
              from reprlib import aRepr  # Py 3
          except ImportError:
              from repr import aRepr  # Py 2
          aRepr.maxstring = 80
      except:
          # This is only a user-facing convenience, so any error we encounter
          # here can be warned about but can be otherwise ignored.  These
          # printouts will tell us about problems if this API changes
          import traceback
  
          traceback.print_exc()
  
      self.debugger = Pdb(colors)
  
imports: from __future__ import print_function
  import bdb
  import functools
  import inspect
  import sys
  import warnings
  from IPython import get_ipython
  from IPython.utils import PyColorize, ulinecache
  from IPython.utils import coloransi, py3compat
  from IPython.core.excolors import exception_colors
  from IPython.testing.skipdoctest import skip_doctest
  from pdb import Pdb
label_desc: Use image node_id 1 to create a new Tracer object from inherited base classes: object with example: obj = Tracer(colors)