Skip to content

Commit 013bdfd

Browse files
committed
fix: insted of starting the debugger, start robotcode.cli in debug launcher
1 parent 10b503c commit 013bdfd

File tree

1 file changed

+4
-6
lines changed
  • packages/debugger/src/robotcode/debugger/launcher

1 file changed

+4
-6
lines changed

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ async def _initialize(self, arguments: InitializeRequestArguments, *args: Any, *
137137
async def _launch(
138138
self,
139139
request: str,
140-
python: str,
140+
python: Optional[str] = None,
141141
cwd: str = ".",
142142
profiles: Optional[List[str]] = None,
143143
target: Optional[str] = None,
@@ -178,13 +178,11 @@ async def _launch(
178178

179179
port = find_free_port(DEBUGGER_DEFAULT_PORT)
180180

181-
debugger_script = (
182-
Path(Path(__file__).parent.parent) if self.debugger_script is None else Path(self.debugger_script)
183-
)
181+
debugger_script = ["-m", "robotcode.cli"] if self.debugger_script is None else [str(Path(self.debugger_script))]
184182

185183
robotcode_run_args = [
186-
python,
187-
str(debugger_script),
184+
python or sys.executable,
185+
*debugger_script,
188186
*itertools.chain.from_iterable(["--profile", p] for p in profiles or []),
189187
*itertools.chain.from_iterable(["--default-path", p] for p in paths or []),
190188
*(robotCodeArgs or []),

0 commit comments

Comments
 (0)