Skip to content

Commit 6b0e96e

Browse files
committed
fix(debug-launcher): switch back to stdio communication, because this does not work on Windows with python <3.8
1 parent 9b782cc commit 6b0e96e

File tree

5 files changed

+21
-13
lines changed

5 files changed

+21
-13
lines changed

.vscode/launch.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,18 @@
5151
"CMD_VAR_LONG": "long",
5252
},
5353
"args": [
54-
// "--verbose",
54+
"--verbose",
5555
// "robot"
5656
// "debug-launch",
5757
// "--pipe-server",
5858
// "\\\\.\\pipe\\926ab05cd224ef08dc3aec29eda1ba61"
5959
// "debug",
6060
// "--",
6161
// "--help"
62-
"run"
62+
// "run"
63+
"debug-launch",
64+
"--pipe-server",
65+
"\\\\.\\pipe\\df1029c255ced57faea2f0227c1170365"
6366
]
6467
},
6568
{

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,13 +373,18 @@
373373
},
374374
"robotcode.debugLauncher.mode": {
375375
"type": "string",
376-
"default": "pipe-server",
377-
"description": "Specifies the mode the debug adapter is started. Requires a VSCode restart to take effect.",
376+
"default": "stdio",
377+
"description": "Specifies the mode the debug launcher is started. Requires a VSCode restart to take effect.",
378378
"enum": [
379379
"stdio",
380380
"tcp",
381381
"pipe-server"
382382
],
383+
"markdownEnumDescriptions": [
384+
"The debug launcher communicates via stdio streams.",
385+
"The debug launcher communicates via tcp streams.",
386+
"The debug launcher communicates via pipe streams. **This maybe not work on Windows and Python versions < 3.10**."
387+
],
383388
"scope": "resource"
384389
},
385390
"robotcode.debugLauncher.tcpPort": {

tests/robotcode/language_server/robotframework/parts/data/.vscode/launch.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
"pythonConfiguration": "RobotCode: Python",
4242
"robotCodeArgs": [
4343
"-v",
44-
// "--log",
45-
// "--log-level=TRACE",
46-
// "--log-calls"
44+
"--log",
45+
"--log-level=TRACE",
46+
"--log-calls"
4747
],
4848
"profiles": [
4949
"ci*",

tests/robotcode/language_server/robotframework/parts/data/.vscode/settings.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,9 @@
4141
"**/lib/alibrary.py"
4242
],
4343
"robotcode.extraArgs": [
44-
// "--log",
45-
// "--log-level",
46-
// "TRACE",
47-
// "--log-calls"
44+
"--log",
45+
"--log-level",
46+
"TRACE",
47+
"--log-calls"
4848
],
49-
"robotcode.debugLauncher.mode": "pipe-server"
5049
}

vscode-client/debugmanager.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ class RobotCodeDebugAdapterDescriptorFactory implements vscode.DebugAdapterDescr
316316
env: {},
317317
};
318318

319-
const args: string[] = [this.pythonManager.robotCodeMain, ...robotcodeExtraArgs, ...launchArgs];
319+
const args: string[] = ["-u", this.pythonManager.robotCodeMain, ...robotcodeExtraArgs, ...launchArgs];
320320

321321
this.outputChannel.appendLine(`Starting debug launcher with command: ${pythonCommand} ${args.join(" ")}`);
322322

@@ -337,6 +337,7 @@ class RobotCodeDebugAdapterDescriptorFactory implements vscode.DebugAdapterDescr
337337
);
338338
}
339339
});
340+
340341
return p;
341342
}
342343
}

0 commit comments

Comments
 (0)