Skip to content

Commit 63f3e4a

Browse files
committed
feat(debugger): increase timeouts for debugger to fit better to python debugger timeouts and introduce environment variables to override these timeouts
1 parent d139ff1 commit 63f3e4a

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

packages/debugger/src/robotcode/debugger/cli.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,34 +39,39 @@
3939
default=True,
4040
help="Waits until a debug client is connected.",
4141
show_default=True,
42+
show_envvar=True,
4243
)
4344
@click.option(
4445
"--wait-for-client-timeout",
4546
type=float,
46-
default=10,
47+
default=15,
4748
help="Timeout in seconds for waiting for a connection with a debug client.",
4849
show_default=True,
50+
show_envvar=True,
4951
)
5052
@click.option(
5153
"--configuration-done-timeout",
5254
type=float,
53-
default=10,
55+
default=15,
5456
help="Timeout to wait for a configuration from client.",
5557
show_default=True,
58+
show_envvar=True,
5659
)
5760
@click.option(
5861
"--debugpy/--no-debugpy",
5962
is_flag=True,
6063
default=False,
6164
help="Enable/disable python debugging.",
6265
show_default=True,
66+
show_envvar=True,
6367
)
6468
@click.option(
6569
"--debugpy-wait-for-client/--no-debugpy-wait-for-client",
6670
is_flag=True,
6771
default=True,
6872
help="Waits for a debugpy client to connect.",
6973
show_default=False,
74+
show_envvar=True,
7075
)
7176
@click.option(
7277
"--debugpy-port",

packages/debugger/src/robotcode/debugger/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def _debug_adapter_server_(
103103
asyncio.run(_debug_adapter_server_async(on_config_done_callback, mode, addresses, port, pipe_name))
104104

105105

106-
DEFAULT_TIMEOUT = 10.0
106+
DEFAULT_TIMEOUT = 15.0
107107

108108

109109
config_done_callback: Optional[Callable[["DebugAdapterServer"], None]] = None

packages/debugger/src/robotcode/debugger/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def connection_lost(self, exc: Optional[BaseException]) -> None:
118118
self._disconnected_event.set()
119119

120120
@_logger.call
121-
def wait_for_client(self, timeout: float = 5) -> bool:
121+
def wait_for_client(self, timeout: float = 15) -> bool:
122122
if not self._connected_event.wait(timeout):
123123
raise TimeoutError("Timeout waiting for client")
124124

@@ -132,7 +132,7 @@ def wait_for_initialized(self, timeout: float = 30) -> bool:
132132
return self._initialized
133133

134134
@_logger.call
135-
def wait_for_disconnected(self, timeout: float = 5) -> bool:
135+
def wait_for_disconnected(self, timeout: float = 15) -> bool:
136136
self._disconnected_event.wait(timeout)
137137

138138
return not self._connected

0 commit comments

Comments
 (0)