import { PythonDebugger, PythonDebuggerConfig } from '../../src/debugger/python/debugpy.js';
import { SessionConfig, DebugLanguage } from '../../src/session/models.js';
async function testInstantiation() {
console.log('[INSTANTIATION_TEST] Starting PythonDebugger instantiation test...');
const dummySessionId = 'test-instantiation-session';
const dummyConfig: PythonDebuggerConfig = {
sessionId: dummySessionId,
pythonPath: 'C:\\Python313\\python.exe', // Provide a valid path
};
try {
console.log(`[INSTANTIATION_TEST] About to call 'new PythonDebugger(${JSON.stringify(dummyConfig)})'`);
const debuggerInstance = new PythonDebugger(dummyConfig);
console.log('[INSTANTIATION_TEST] Successfully instantiated PythonDebugger.');
if (debuggerInstance) {
console.log('[INSTANTIATION_TEST] debuggerInstance is not null.');
// We could try calling initialize here too, but let's start with just instantiation
// try {
// console.log('[INSTANTIATION_TEST] About to call initialize...');
// await debuggerInstance.initialize({ sessionId: dummySessionId });
// console.log('[INSTANTIATION_TEST] initialize completed.');
// } catch (initError) {
// console.error('[INSTANTIATION_TEST] Error during initialize:', initError);
// }
} else {
console.error('[INSTANTIATION_TEST] PythonDebugger instance is null after new call (this should not happen if no error thrown).');
}
} catch (error) {
console.error('[INSTANTIATION_TEST] CRITICAL ERROR during PythonDebugger instantiation:', error);
}
console.log('[INSTANTIATION_TEST] Test finished.');
}
testInstantiation();