Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/client/debugger/mainV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import { BaseDebugServer } from './DebugServers/BaseDebugServer';
import { initializeIoc } from './serviceRegistry';
import { IDebugStreamProvider, IProtocolLogger, IProtocolMessageWriter, IProtocolParser } from './types';

const DEBUGGER_CONNECT_TIMEOUT = 10000;
const MIN_DEBUGGER_CONNECT_TIMEOUT = DEBUGGER_CONNECT_TIMEOUT / 2;
const DEBUGGER_CONNECT_TIMEOUT = 20000;
const MIN_DEBUGGER_CONNECT_TIMEOUT = 5000;

export class PythonDebugger extends DebugSession {
public debugServer?: BaseDebugServer;
Expand Down Expand Up @@ -123,7 +123,7 @@ export class PythonDebugger extends DebugSession {
private getConnectionTimeout(args: LaunchRequestArguments) {
// The timeout can be overridden, but won't be documented unless we see the need for it.
// This is just a fail safe mechanism, if the current timeout isn't enough (let study the current behaviour before exposing this setting).
const connectionTimeout = typeof (args as any).connectionTimeout === 'number' ? (args as any).connectionTimeout as number : DEBUGGER_CONNECT_TIMEOUT;
const connectionTimeout = typeof (args as any).timeout === 'number' ? (args as any).timeout as number : DEBUGGER_CONNECT_TIMEOUT;
return Math.max(connectionTimeout, MIN_DEBUGGER_CONNECT_TIMEOUT);
}
private getErrorUserFriendlyMessage(launchArgs: LaunchRequestArguments, error: any): string | undefined {
Expand Down