@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.
78 lines (77 loc) • 2.03 kB
TypeScript
/**
* Debug configuration presets for common debugging scenarios
* Provides pre-configured settings for Node.js apps, test frameworks, and custom scenarios
*/
export interface DebugPreset {
name: string;
description: string;
command: string;
args?: string[];
cwd?: string;
env?: Record<string, string>;
timeout?: number;
breakpoints?: Array<{
file: string;
line: number;
condition?: string;
}>;
extends?: string;
}
export interface PresetComposition {
base: string;
overrides: Partial<DebugPreset>;
}
/**
* Built-in presets for common debugging scenarios
*/
export declare const BUILTIN_PRESETS: Record<string, DebugPreset>;
/**
* Manages debug configuration presets
*/
export declare class DebugPresetManager {
private customPresets;
/**
* Get a preset by name (checks custom presets first, then built-in)
*/
getPreset(name: string): DebugPreset | undefined;
/**
* List all available presets
*/
listPresets(): DebugPreset[];
/**
* Register a custom preset
*/
registerPreset(preset: DebugPreset): void;
/**
* Remove a custom preset
*/
removePreset(name: string): boolean;
/**
* Resolve a preset with inheritance
* If preset extends another preset, merge the configurations
*/
resolvePreset(name: string): DebugPreset | undefined;
/**
* Compose multiple presets together
*/
composePresets(composition: PresetComposition): DebugPreset;
/**
* Merge two preset configurations (child overrides parent)
*/
private mergePresets;
/**
* Apply a preset to create a debug configuration
*/
applyPreset(presetName: string, overrides?: Partial<DebugPreset>): DebugPreset;
/**
* Validate a preset configuration
*/
validatePreset(preset: DebugPreset): {
valid: boolean;
errors: string[];
};
/**
* Clear all custom presets
*/
clearCustomPresets(): void;
}