Skip to content

Commit 77b5924

Browse files
committed
add a logger.warning if debugpy port is not free and we use another free port
1 parent 4342aa9 commit 77b5924

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

robotcode/debugger/__main__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ async def start_debugpy_async(
9090
from .dap_types import Event
9191

9292
port = check_free_port(debugpy_port)
93+
if port != debugpy_port:
94+
_logger.warning(f"start debugpy session on port {port}")
9395

9496
if enable_debugpy(port) and await run_coroutine_from_thread_async(
9597
server.protocol.wait_for_client, wait_for_client_timeout, loop=server.loop

robotcode/utils/debugpy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def start_debugpy(port: int, wait_for_client: bool) -> bool:
4040

4141
real_port = check_free_port(port)
4242
if real_port != port:
43-
_logger.info(f"start debugpy session on port {real_port}")
43+
_logger.warning(f"start debugpy session on port {real_port}")
4444
debugpy.listen(real_port)
4545

4646
if wait_for_client:

0 commit comments

Comments
 (0)