@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.
66 lines (65 loc) • 2.01 kB
TypeScript
import { InspectorClient } from './inspector-client';
import { Breakpoint } from './debug-session';
/**
* Script information from CDP
*/
interface ScriptInfo {
scriptId: string;
url: string;
}
/**
* Handles CDP breakpoint operations
* Maps file paths to script IDs and manages breakpoint lifecycle via CDP
*/
export declare class CdpBreakpointOperations {
private inspector;
private scripts;
constructor(inspector: InspectorClient);
/**
* Set a breakpoint via CDP
* @param breakpoint Breakpoint to set
* @returns CDP breakpoint ID if successful
*/
setBreakpoint(breakpoint: Breakpoint): Promise<string | undefined>;
/**
* Set a logpoint via CDP
* Logpoints are implemented as conditional breakpoints that log and return false
* @param breakpoint Logpoint to set
* @returns CDP breakpoint ID if successful
*/
private setLogpoint;
/**
* Create a CDP condition for a logpoint
* The condition logs the message and returns false to not pause execution
* @param logMessage Log message template with {variable} interpolation
* @returns CDP condition string
*/
private createLogpointCondition;
/**
* Set a function breakpoint via CDP
* Function breakpoints pause when a function with the given name is called
* @param breakpoint Function breakpoint to set
* @returns CDP breakpoint ID if successful
*/
private setFunctionBreakpoint;
/**
* Remove a breakpoint via CDP
* @param cdpBreakpointId CDP breakpoint ID
* @returns True if successful
*/
removeBreakpoint(cdpBreakpointId: string): Promise<boolean>;
/**
* Find a script by file path
* Handles both exact matches and partial matches (e.g., relative vs absolute paths)
*/
private findScriptByFile;
/**
* Get all known scripts
*/
getScripts(): ScriptInfo[];
/**
* Clear the script cache
*/
clearScripts(): void;
}
export {};