class_docstr: Modified Pdb class, does not load readline.
  
  for a standalone version that uses prompt_toolkit, see
  `IPython.terminal.debugger.TerminalPdb` and
  `IPython.terminal.debugger.set_trace()`
  
  
  This debugger can hide and skip frames that are tagged according to some predicates.
  See the `skip_predicates` commands.
class_docstr_tok: ["Modified","Pdb","class",",","does","not","load","readline",".","for","a","standalone","version","that","uses","prompt_toolkit",",","see","`","IPython.terminal.debugger.TerminalPdb","`","and","`","IPython.terminal.debugger.set_trace","(",")","`","This","debugger","can","hide","and","skip","frames","that","are","tagged","according","to","some","predicates",".","See","the","`","skip_predicates","`","commands","."]
code: def format_stack_entry(
      self, frame_lineno, lprefix=": ", context=None
  ):
      if context is None:
          context = self.context
      try:
          context = int(context)
          if context <= 0:
              print(
                  "Context must be a positive integer", file=self.stdout
              )
      except (TypeError, ValueError):
          print("Context must be a positive integer", file=self.stdout)
  
      import reprlib
  
      ret = []
  
      Colors = self.color_scheme_table.active_colors
      ColorsNormal = Colors.Normal
      tpl_link = "%s%%s%s" % (Colors.filenameEm, ColorsNormal)
      tpl_call = "%s%%s%s%%s%s" % (
          Colors.vName,
          Colors.valEm,
          ColorsNormal,
      )
      tpl_line = "%%s%s%%s %s%%s" % (Colors.lineno, ColorsNormal)
      tpl_line_em = "%%s%s%%s %s%%s%s" % (
          Colors.linenoEm,
          Colors.line,
          ColorsNormal,
      )
  
      frame, lineno = frame_lineno
  
      return_value = ""
      loc_frame = self._get_frame_locals(frame)
      if "__return__" in loc_frame:
          rv = loc_frame["__return__"]
          # return_value += '->'
          return_value += reprlib.repr(rv) + "\n"
      ret.append(return_value)
  
      # s = filename + '(' + `lineno` + ')'
      filename = self.canonic(frame.f_code.co_filename)
      link = tpl_link % py3compat.cast_unicode(filename)
  
      if frame.f_code.co_name:
          func = frame.f_code.co_name
      else:
          func = "<lambda>"
  
      call = ""
      if func != "?":
          if "__args__" in loc_frame:
              args = reprlib.repr(loc_frame["__args__"])
          else:
              args = "()"
          call = tpl_call % (func, args)
  
      # The level info should be generated in the same format pdb uses, to
      # avoid breaking the pdbtrack functionality of python-mode in *emacs.
      if frame is self.curframe:
          ret.append("> ")
      else:
          ret.append("  ")
      ret.append("%s(%s)%s\n" % (link, lineno, call))
  
      start = lineno - 1 - context // 2
      lines = linecache.getlines(filename, frame.f_globals)
      start = min(start, len(lines) - context)
      start = max(start, 0)
      lines = lines[start : start + context]
  
      for i, line in enumerate(lines):
          show_arrow = start + 1 + i == lineno
          linetpl = (
              (frame is self.curframe or show_arrow)
              and tpl_line_em
              or tpl_line
          )
          ret.append(
              self.__format_line(
                  linetpl,
                  filename,
                  start + 1 + i,
                  line,
                  arrow=show_arrow,
              )
          )
      return "".join(ret)
  
imports: import inspect
  import linecache
  import sys
  import re
  import os
  from IPython import get_ipython
  from contextlib import contextmanager
  from IPython.utils import PyColorize
  from IPython.utils import coloransi, py3compat
  from IPython.core.excolors import exception_colors
  from pdb import Pdb
label_desc: Use image node_id 14 for calling the Pdb obj's underlying member method code with example usage: obj.format_stack_entry(frame_lineno, lprefix, context) and returns: str