code: def _DebuggerMain():
    
    global _flags
  
    # The first argument is cdbg module, which we don't care.
    del sys.argv[0]
  
    # Parse debugger flags until we encounter '--'.
    _flags = {}
    while sys.argv[0]:
      arg = sys.argv[0]
      del sys.argv[0]
  
      if arg == '--':
        break
  
      (name, value) = arg.strip('-').split('=', 2)
      _flags[name] = value
  
    _StartDebugger()
  
    # Run the app. The following code was mostly copied from pdb.py.
    app_path = sys.argv[0]
  
    sys.path[0] = os.path.dirname(app_path)
  
    import __main__  # pylint: disable=g-import-not-at-top
    __main__.__dict__.clear()
    __main__.__dict__.update({'__name__': '__main__',
                              '__file__': app_path,
                              '__builtins__': __builtins__})
    locals = globals = __main__.__dict__  # pylint: disable=redefined-builtin
  
    sys.modules['__main__'] = __main__
  
    with open(app_path) as f:
      code = compile(f.read(), app_path, 'exec')
      exec(code, globals, locals)
docs: Starts the debugger and runs the application with debugger attached.