UNPKG

nodejs-debug-mcp

Version:

Model Context Protocol server exposing a debug-script tool for Node.js inspector sessions.

51 lines 1.83 kB
import type { ChildProcess } from 'node:child_process'; import type { Client } from 'chrome-remote-interface'; import type { DebugScriptArguments, DebugScriptResponse, ToolContent } from './types.js'; export declare const PROCESS_EXIT_ERROR = "Process exited before breakpoint was hit"; export declare function createContent(message?: string): ToolContent[]; interface SessionOptions { breakpointId: string; targetUrl: string; targetLineNumber: number; targetScriptId?: string; } export declare class BreakpointEvaluationSession { private readonly Debugger; private readonly Runtime; private readonly child; private readonly client; private readonly args; private readonly options; private state; private readonly evaluations; private readonly scriptIdToUrl; private timeoutId; private resolvePromise; private listenersAttached; private removePausedListener; constructor(args: DebugScriptArguments, child: ChildProcess, client: Client, options: SessionOptions); start(): Promise<DebugScriptResponse>; private attachListeners; private detachListeners; private startTimeout; private clearTimeout; private childExited; private isSettled; private recordEvaluation; private hasEvaluations; private finishOnProcessTermination; private settleWithProcessExitError; private settleWithError; private settle; private readonly handleProcessTermination; private readonly handleScriptParsed; private readonly handleExecutionContextDestroyed; private readonly handleRuntimeReady; private readonly handleRuntimeError; private readonly handlePaused; private createStack; private resolveCallFrameUrl; private normalizeFilePath; } export {}; //# sourceMappingURL=breakpoint-session.d.ts.map