Skip to content

Commit 9ecaac7

Browse files
authored
🔨 increase timeout to 20s (sometimes need 15s on Win+Powershell) (#867)
Fixes #866
1 parent fe1a780 commit 9ecaac7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/client/debugger/mainV2.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ import { BaseDebugServer } from './DebugServers/BaseDebugServer';
2626
import { initializeIoc } from './serviceRegistry';
2727
import { IDebugStreamProvider, IProtocolLogger, IProtocolMessageWriter, IProtocolParser } from './types';
2828

29-
const DEBUGGER_CONNECT_TIMEOUT = 10000;
30-
const MIN_DEBUGGER_CONNECT_TIMEOUT = DEBUGGER_CONNECT_TIMEOUT / 2;
29+
const DEBUGGER_CONNECT_TIMEOUT = 20000;
30+
const MIN_DEBUGGER_CONNECT_TIMEOUT = 5000;
3131

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

0 commit comments

Comments
 (0)