code: def _MainThreadProc(self):
      
      registration_required = True
      while not self._shutdown:
        if registration_required:
          service = self._BuildService()
          registration_required, delay = self._RegisterDebuggee(service)
  
        if not registration_required:
          registration_required, delay = self._ListActiveBreakpoints(service)
  
        if self.on_idle is not None:
          self.on_idle()
  
        if not self._shutdown:
          time.sleep(delay)
docs: Entry point for the worker thread.