Setup debugger to "suspend" execution
494948
def setup_suspend(self):
        
        self.frame_calling = None
        self.frame_stop = None
        self.frame_return = None
        self.frame_suspend = True
        self.pending_stop = True
        self.enable_tracing()
        return
940056
def debug
      raise ArgumentError,
        "RDO::Connection#debug requires a block" unless block_given?

      reset, logger.level = logger.level, Logger::DEBUG
      yield
    ensure
      logger.level = reset
    end
1364193
def _StartDebugger():
  """"""
  global _hub_client
  global _breakpoints_manager

  cdbg_native.InitializeModule(_flags)

  _hub_client = gcp_hub_client.GcpHubClient()
  visibility_policy = _GetVisibilityPolicy()

  _breakpoints_manager = breakpoints_manager.BreakpointsManager(
      _hub_client,
      visibility_policy)

  # Set up loggers for logpoints.
  capture_collector.SetLogger(logging.getLogger())

  capture_collector.CaptureCollector.pretty_printers.append(
      appengine_pretty_printers.PrettyPrinter)

  _hub_client.on_active_breakpoints_changed = (
      _breakpoints_manager.SetActiveBreakpoints)
  _hub_client.on_idle = _breakpoints_manager.CheckBreakpointsExpiration
  _hub_client.SetupAuth(
      _flags.get('project_id'),
      _flags.get('project_number'),
      _flags.get('service_account_json_file'))
  _hub_client.InitializeDebuggeeLabels(_flags)
  _hub_client.Start()
1239806
def start debug=false,method=:every_minute,*args
      @stopped = false
      @suspended = false
      @dead = Queue.new
      @thread = CronR::Utils.send(method,debug,*args) {
        time = self.time
        @mutex.synchronize {
          if @stopped then
            # It's important we put something on this queue ONLY AFTER
            # we've acquired the mutex...
            @dead.enq(true)
            true
          elsif @suspended then
          else
            self.run(time)
          end
        }
      }
    end
575288
def debug(self, message, *args, **kwargs):
        
        self.system.debug(message, *args, **kwargs)
1201655
def set_debug(enabled: bool):
    
    global _DEBUG_ENABLED

    if not enabled:
        log('Disabling debug output...', logger_name=_LOGGER_NAME)
        _DEBUG_ENABLED = False
    else:
        _DEBUG_ENABLED = True
        log('Enabling debug output...', logger_name=_LOGGER_NAME)
877285
def set_or_clear_breakpoint(self):
        """"""
        if self.data:
            editor = self.get_current_editor()
            editor.debugger.toogle_breakpoint()
914644
def set_debug_mode(debug=True):
    
    global debug_mode
    global _setting_keep_wirevector_call_stack
    global _setting_slower_but_more_descriptive_tmps
    debug_mode = debug
    _setting_keep_wirevector_call_stack = debug
    _setting_slower_but_more_descriptive_tmps = debug
1329771
protected void waitDebuggerConnected(ILaunch launch,
			DebugSessionAcceptor acceptor) throws CoreException
	{
		int timeout = VdmDebugPlugin.getDefault().getConnectionTimeout();
		if (!acceptor.waitConnection(timeout))
		{
			launch.terminate();
			return;
		}
		if (!acceptor.waitInitialized(60 * 60 * 1000))
		{
			launch.terminate();
			abort("errDebuggingEngineNotInitialized", null);
		}
	}
92914
def enable_debug(self):
        """"""

        if not self.connected:
            raise HardwareError("Cannot enable debug if we are not in a connected state")

        self._loop.run_coroutine(self.adapter.open_interface(0, 'debug'))
339791
def Run(self, unused_args):
    """"""
    if flags.FLAGS.pdb_post_mortem:
      logging.warning("Segfault action requested :(")
      print(ctypes.cast(1, ctypes.POINTER(ctypes.c_void_p)).contents)
    else:
      logging.warning("Segfault requested but not running in debug mode.")
826155
public synchronized void setDebug(boolean debug)
    {
        boolean oldDebug=_debugOn;
        if (_debugOn && !debug)
            this.message(DEBUG,"DEBUG OFF");
        _debugOn=debug;
        if (!oldDebug && debug)
            this.message(DEBUG,"DEBUG ON");
    }
484671
private void setupDebugger(Debugger debugger) {
        if (debugger == null) {
            return;
        }

        this.debugger = debugger;
        JSObject globalObject = getGlobalContext().getObject();
        String debuggerName = getRuntime().getConfig().getExposeDebugAs();
        Object currentDebugger = globalObject.get(this, debuggerName);
        if (!(currentDebugger instanceof DebuggerAPI)) {
            DebuggerAPI api = new DebuggerAPI(getGlobalContext(), debugger);
            globalObject.put(this, debuggerName, api, false);
        }
    }
545532
def remote_debug(sig,frame):
    """"""
    def _raiseEx(ex):
        """Raise specified exception in the remote process"""
        _raiseEx.ex = ex
    _raiseEx.ex = None
    
    try:
        # Provide some useful functions.
        locs = {'_raiseEx' : _raiseEx}
        locs.update(frame.f_locals)  # Unless shadowed.
        globs = frame.f_globals
        
        pid = os.getpid()  # Use pipe name based on pid
        pipe = NamedPipe(pipename(pid))
    
        old_stdout, old_stderr = sys.stdout, sys.stderr
        txt = ''
        pipe.put("Interrupting process at following point:\n" + 
               ''.join(traceback.format_stack(frame)) + ">>> ")
        
        try:
            while pipe.is_open() and _raiseEx.ex is None:
                line = pipe.get()
                if line is None: continue # EOF
                txt += line
                try:
                    code = codeop.compile_command(txt)
                    if code:
                        sys.stdout = six.StringIO()
                        sys.stderr = sys.stdout
                        six.exec_(code, globs, locs)
                        txt = ''
                        pipe.put(sys.stdout.getvalue() + '>>> ')
                    else:
                        pipe.put('... ')
                except:
                    txt='' # May be syntax err.
                    sys.stdout = six.StringIO()
                    sys.stderr = sys.stdout
                    traceback.print_exc()
                    pipe.put(sys.stdout.getvalue() + '>>> ')
        finally:
            sys.stdout = old_stdout # Restore redirected output.
            sys.stderr = old_stderr
            pipe.close()

    except Exception:  # Don't allow debug exceptions to propogate to real program.
        traceback.print_exc()
        
    if _raiseEx.ex is not None: raise _raiseEx.ex
784623
def enable_debug(self):
        
        if self.args.foreground:
            self.config.application[config.DEBUG] = True
717842
def debug(*args, **attrs):
    """"""
    attrs.setdefault("is_flag", True)
    attrs.setdefault("default", None)
    return option(debug, *args, **attrs)
1372157
def debounce(interval_s, keyed_by=None):
    """"""
    def wrapper(func):
        timers = {}
        lock = threading.Lock()

        @functools.wraps(func)
        def debounced(*args, **kwargs):
            call_args = inspect.getcallargs(func, *args, **kwargs)
            key = call_args[keyed_by] if keyed_by else None

            def run():
                with lock:
                    del timers[key]
                return func(*args, **kwargs)

            with lock:
                old_timer = timers.get(key)
                if old_timer:
                    old_timer.cancel()

                timer = threading.Timer(interval_s, run)
                timers[key] = timer
                timer.start()
        return debounced
    return wrapper