MCPcopy Index your code
hub / github.com/nodejs/node / handleDebuggerPaused

Method handleDebuggerPaused

deps/v8/test/debugger/test-api.js:707–758  ·  view source on GitHub ↗
(message)

Source from the content-addressed store, hash-verified

705 }
706
707 handleDebuggerPaused(message) {
708 const params = message.params;
709
710 var debugEvent;
711 switch (params.reason) {
712 case "exception":
713 case "promiseRejection":
714 debugEvent = this.DebugEvent.Exception;
715 break;
716 case "OOM":
717 debugEvent = this.DebugEvent.OOM;
718 break;
719 case "other":
720 case "step":
721 case "ambiguous":
722 debugEvent = this.DebugEvent.Break;
723 break;
724 case "XHR":
725 case "DOM":
726 case "EventListener":
727 case "assert":
728 case "debugCommand":
729 case "CSPViolation":
730 assertUnreachable();
731 default:
732 assertUnreachable();
733 }
734
735 if (!params.callFrames[0]) return;
736
737 // Skip break events in this file.
738 if (params.callFrames[0].location.scriptId == this.thisScriptId) return;
739
740 // TODO(jgruber): Arguments as needed.
741 let execState = { frames : params.callFrames,
742 prepareStep : this.execStatePrepareStep.bind(this),
743 evaluateGlobal :
744 (expr) => this.evaluateGlobal(expr),
745 frame : (index) => this.execStateFrame(
746 index ? params.callFrames[index]
747 : params.callFrames[0]),
748 frameCount : () => params.callFrames.length
749 };
750
751 let eventData = this.execStateFrame(params.callFrames[0]);
752 if (debugEvent == this.DebugEvent.Exception) {
753 eventData.uncaught = () => params.data.uncaught;
754 eventData.exception = () => this.eventDataException(params);
755 }
756
757 this.invokeListener(debugEvent, execState, eventData);
758 }
759
760 handleDebuggerScriptParsed(message) {
761 const params = message.params;

Callers 1

dispatchMessageMethod · 0.95

Calls 6

evaluateGlobalMethod · 0.95
execStateFrameMethod · 0.95
eventDataExceptionMethod · 0.95
invokeListenerMethod · 0.95
assertUnreachableFunction · 0.85
bindMethod · 0.45

Tested by

no test coverage detected