Skip to content

Commit d4b8f30

Browse files
committed
implement debugging on different interfaces
1 parent 73ef0e0 commit d4b8f30

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

robotcode/debugger/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ async def run_robot(
132132
from .dap_types import Event
133133
from .debugger import Debugger
134134

135-
server_future = run_coroutine_in_thread(_debug_adapter_server_, "127.0.0.1", port)
135+
server_future = run_coroutine_in_thread(_debug_adapter_server_, bind, port)
136136

137137
server = await wait_for_server()
138138

robotcode/debugger/debugger.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ def set_breakpoints(
406406
lines: Optional[List[int]] = None,
407407
source_modified: Optional[bool] = None,
408408
) -> List[Breakpoint]:
409-
409+
410410
if self.is_windows_path(source.path or ""):
411411
path = pathlib.PureWindowsPath(source.path or "")
412412
else:
@@ -419,7 +419,8 @@ def set_breakpoints(
419419
tuple(breakpoints) if breakpoints else (), tuple(lines) if lines else ()
420420
)
421421
return [
422-
Breakpoint(id=id(v), source=Source(path=str(path)), verified=True, line=v.line) for v in result.breakpoints
422+
Breakpoint(id=id(v), source=Source(path=str(path)), verified=True, line=v.line)
423+
for v in result.breakpoints
423424
]
424425
else:
425426
self._logger.error("not supported breakpoint")

robotcode/jsonrpc2/server.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
Generic,
1313
NamedTuple,
1414
Optional,
15+
Sequence,
1516
Type,
1617
TypeVar,
18+
Union,
1719
cast,
1820
)
1921

@@ -52,7 +54,7 @@ class JsonRpcServerMode(Enum):
5254

5355

5456
class TcpParams(NamedTuple):
55-
host: Optional[str] = None
57+
host: Optional[Union[str, Sequence[str]]] = None
5658
port: int = 0
5759

5860

0 commit comments

Comments
 (0)