function pauseInDebuggerAndRunIfRequired(target, error, required)
        {
            // Only pause new worker if debugging SW - we are going through the
            // pause on start checkbox.
            var mainIsServiceWorker = WebInspector.targetManager.mainTarget().isServiceWorker();
            if (mainIsServiceWorker && required)
                target.debuggerAgent().pause();
            target.runtimeAgent().run();
        }
@param {!WebInspector.Target} target
@param {?Protocol.Error} error
@param {boolean} required