class_docstr: Magics related to code execution, debugging, profiling, etc.
  
      
docstr: Run `code` in debugger with a break point.
  
  Parameters
  ----------
  code : str
      Code to execute.
  code_ns : dict
      A namespace in which `code` is executed.
  filename : str
      `code` is ran as if it is in `filename`.
  bp_line : int, optional
      Line number of the break point.
  bp_file : str, optional
      Path to the file in which break point is specified.
      `filename` is used if not given.
  
  Raises
  ------
  UsageError
      If the break point given by `bp_line` is not valid.
docstr_tok: ["Run","`","code","`","in","debugger","with","a","break","point",".","Parameters","--","--","--","--","--","code",":","str","Code","to","execute",".","code_ns",":","dict","A","namespace","in","which","`","code","`","is","executed",".","filename",":","str","`","code","`","is","ran","as","if","it","is","in","`","filename","`",".","bp_line",":","int",",","optional","Line","number","of","the","break","point",".","bp_file",":","str",",","optional","Path","to","the","file","in","which","break","point","is","specified",".","`","filename","`","is","used","if","not","given",".","Raises","--","--","--","UsageError","If","the","break","point","given","by","`","bp_line","`","is","not","valid","."]
code: def _run_with_debugger(
      self, code, code_ns, filename=None, bp_line=None, bp_file=None
  ):
      """
      Run `code` in debugger with a break point.
  
      Parameters
      ----------
      code : str
          Code to execute.
      code_ns : dict
          A namespace in which `code` is executed.
      filename : str
          `code` is ran as if it is in `filename`.
      bp_line : int, optional
          Line number of the break point.
      bp_file : str, optional
          Path to the file in which break point is specified.
          `filename` is used if not given.
  
      Raises
      ------
      UsageError
          If the break point given by `bp_line` is not valid.
  
      """
      deb = self.shell.InteractiveTB.pdb
      if not deb:
          self.shell.InteractiveTB.pdb = (
              self.shell.InteractiveTB.debugger_cls()
          )
          deb = self.shell.InteractiveTB.pdb
  
      # deb.checkline() fails if deb.curframe exists but is None; it can
      # handle it not existing. https://github.com/ipython/ipython/issues/10028
      if hasattr(deb, "curframe"):
          del deb.curframe
  
      # reset Breakpoint state, which is moronically kept
      # in a class
      bdb.Breakpoint.next = 1
      bdb.Breakpoint.bplist = {}
      bdb.Breakpoint.bpbynumber = [None]
      deb.clear_all_breaks()
      if bp_line is not None:
          # Set an initial breakpoint to stop execution
          maxtries = 10
          bp_file = bp_file or filename
          checkline = deb.checkline(bp_file, bp_line)
          if not checkline:
              for bp in range(bp_line + 1, bp_line + maxtries + 1):
                  if deb.checkline(bp_file, bp):
                      break
              else:
                  msg = (
                      "\nI failed to find a valid line to set "
                      "a breakpoint\n"
                      "after trying up to line: %s.\n"
                      "Please set a valid breakpoint manually "
                      "with the -b option." % bp
                  )
                  raise UsageError(msg)
          # if we find a good linenumber, set the breakpoint
          deb.do_break("%s:%s" % (bp_file, bp_line))
  
      if filename:
          # Mimic Pdb._runscript(...)
          deb._wait_for_mainpyfile = True
          deb.mainpyfile = deb.canonic(filename)
  
      # Start file run
      print(
          "NOTE: Enter 'c' at the %s prompt to continue execution."
          % deb.prompt
      )
      try:
          if filename:
              # save filename so it can be used by methods on the deb object
              deb._exec_filename = filename
          while True:
              try:
                  deb.run(code, code_ns)
              except Restart:
                  print("Restarting")
                  if filename:
                      deb._wait_for_mainpyfile = True
                      deb.mainpyfile = deb.canonic(filename)
                  continue
              else:
                  break
  
      except:
          etype, value, tb = sys.exc_info()
          # Skip three frames in the traceback: the %run one,
          # one inside bdb.py, and the command-line typed by the
          # user (run by exec in pdb itself).
          self.shell.InteractiveTB(etype, value, tb, tb_offset=3)
  
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 11 for calling the ExecutionMagics obj's underlying member method code with example usage: obj._run_with_debugger(code, code_ns, filename, bp_line, bp_file) without return types