UNPKG

@ai-capabilities-suite/mcp-debugger-core

Version:

Core debugging engine for Node.js and TypeScript applications. Provides Inspector Protocol integration, breakpoint management, variable inspection, execution control, profiling, hang detection, and source map support.

46 lines (45 loc) 1.18 kB
/** * Stack frame information for hang detection */ export interface HangStackFrame { functionName: string; file: string; line: number; column: number; } /** * Result of hang detection */ export interface HangDetectionResult { hung: boolean; completed?: boolean; exitCode?: number; location?: string; stack?: HangStackFrame[]; message?: string; duration?: number; } /** * Configuration for hang detection */ export interface HangDetectionConfig { command: string; args?: string[]; cwd?: string; timeout: number; sampleInterval?: number; } /** * Detects hanging processes and infinite loops * Monitors process execution and samples call stack periodically * Requirements: 5.1, 5.2, 5.3, 5.4 */ export declare class HangDetector { /** * Detect if a process hangs or enters an infinite loop * Starts a process with inspector and monitors it for hangs * @param config Configuration including command, args, timeout, and sample interval * @returns Hang detection result with status and location if hung */ detectHang(config: HangDetectionConfig): Promise<HangDetectionResult>; }