File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -337,24 +337,7 @@ export class DebuggingExecutor implements IDebuggingExecutor {
337337 * Check if there's an active debug session that is ready for debugging operations
338338 */
339339 public async hasActiveSession ( ) : Promise < boolean > {
340- // Quick check first - no session at all
341- if ( ! vscode . debug . activeDebugSession ) {
342- return false ;
343- }
344-
345- try {
346- // Get the current debug state and check if it has location information
347- // This is the most reliable way to determine if the debugger is truly ready
348- const debugState = await this . getCurrentDebugState ( ) ;
349-
350- // A session is ready when it has location info (file name and line number)
351- // This means the debugger has attached and we can see where we are in the code
352- return debugState . sessionActive && debugState . hasLocationInfo ( ) ;
353- } catch ( error ) {
354- // Any error means session isn't ready (e.g., Python still initializing)
355- console . log ( 'Session readiness check failed:' , error ) ;
356- return false ;
357- }
340+ return vscode . debug . activeDebugSession !== undefined ;
358341 }
359342
360343 /**
You can’t perform that action at this time.
0 commit comments