/** * Mock Debug Adapter implementation for testing * * Provides a fully functional debug adapter that simulates debugging * without requiring external dependencies. * * @since 2.0.0 */ import { EventEmitter } from 'events'; import { DebugProtocol } from '@vscode/debugprotocol'; import { IDebugAdapter, AdapterState, ValidationResult, DependencyInfo, AdapterCommand, AdapterConfig, GenericLaunchConfig, LanguageSpecificLaunchConfig, DebugFeature, FeatureRequirement, AdapterCapabilities } from '@debugmcp/shared'; import { DebugLanguage } from '@debugmcp/shared'; import { AdapterDependencies } from '@debugmcp/shared'; /** * Mock adapter configuration */ export interface MockAdapterConfig { connectionDelay?: number; supportedFeatures?: DebugFeature[]; } /** * Mock error scenarios */ export declare enum MockErrorScenario { NONE = "none", EXECUTABLE_NOT_FOUND = "executable_not_found", CONNECTION_TIMEOUT = "connection_timeout" } /** * Mock debug adapter implementation */ export declare class MockDebugAdapter extends EventEmitter implements IDebugAdapter { readonly language = DebugLanguage.MOCK; readonly name = "Mock Debug Adapter"; private state; private config; private dependencies; private currentThreadId; private connected; private errorScenario; constructor(dependencies: AdapterDependencies, config?: MockAdapterConfig); initialize(): Promise; dispose(): Promise; getState(): AdapterState; isReady(): boolean; getCurrentThreadId(): number | null; private transitionTo; validateEnvironment(): Promise; getRequiredDependencies(): DependencyInfo[]; resolveExecutablePath(preferredPath?: string): Promise; getDefaultExecutableName(): string; getExecutableSearchPaths(): string[]; buildAdapterCommand(config: AdapterConfig): AdapterCommand; getAdapterModuleName(): string; getAdapterInstallCommand(): string; transformLaunchConfig(config: GenericLaunchConfig): Promise; getDefaultLaunchConfig(): Partial; sendDapRequest(command: string, args?: unknown): Promise; handleDapEvent(event: DebugProtocol.Event): void; handleDapResponse(_response: DebugProtocol.Response): void; connect(host: string, port: number): Promise; disconnect(): Promise; isConnected(): boolean; getInstallationInstructions(): string; getMissingExecutableError(): string; translateErrorMessage(error: Error): string; supportsFeature(feature: DebugFeature): boolean; getFeatureRequirements(feature: DebugFeature): FeatureRequirement[]; getCapabilities(): AdapterCapabilities; /** * Set error scenario for testing */ setErrorScenario(scenario: MockErrorScenario): void; } //# sourceMappingURL=mock-debug-adapter.d.ts.map