Skip to content

Commit 56d0d70

Browse files
committed
implement robotcode.robot.outputDir
1 parent 799de3e commit 56d0d70

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"ms-python.python",
66
"ms-python.vscode-pylance",
77
"esbenp.prettier-vscode",
8-
"dbaeumer.vscode-eslint"
8+
"dbaeumer.vscode-eslint",
9+
"tamasfe.even-better-toml"
910
]
1011
}

package.json

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Robot Framework support for Visual Studio Code",
55
"icon": "images/icon.png",
66
"publisher": "d-biehl",
7-
"version": "0.2.0-alpha.0",
7+
"version": "0.2.0-alpha.0",
88
"repository": {
99
"type": "git",
1010
"url": "https://github.com/d-biehl/robotcode.git"
@@ -147,10 +147,7 @@
147147
},
148148
"robotcode.robot.args": {
149149
"type": "array",
150-
"default": [
151-
"--outputdir",
152-
"results"
153-
],
150+
"default": [],
154151
"items": {
155152
"type": "string"
156153
},
@@ -181,6 +178,12 @@
181178
"description": "Specifies the variables for robotframework. Corresponds to the '--variable name:value' option of the robot module.",
182179
"scope": "resource"
183180
},
181+
"robotcode.robot.outputDir": {
182+
"type": "string",
183+
"default": "results",
184+
"description": "Specifies the output directory where robotframework saves output files.",
185+
"scope": "resource"
186+
},
184187
"robotcode.debug.defaultConfiguration": {
185188
"type": "object",
186189
"default": {},
@@ -336,6 +339,11 @@
336339
"description": "Timeout to connect to the debuggee.",
337340
"default": 5
338341
},
342+
"outputDir": {
343+
"type": "string",
344+
"default": null,
345+
"description": "Specifies the output directory where robotframework saves output files."
346+
},
339347
"outputMessages": {
340348
"type": "boolean",
341349
"description": "Output messages from robotframework in debug console.",
@@ -385,15 +393,15 @@
385393
"lint-fix": "eslint --ext .ts,.tsx,.js --fix .",
386394
"test": "node ./out/test/runTest.js",
387395
"download-api": "vscode-dts dev",
388-
"postdownload-api": "vscode-dts main",
389-
"_postinstall": "npm run download-api"
396+
"postdownload-api": "vscode-dts main",
397+
"_postinstall": "npm run download-api"
390398
},
391399
"extensionDependencies": [
392400
"ms-python.python"
393401
],
394402
"dependencies": {
395-
"vscode-debugadapter": "^1.49.0",
396-
"vscode-languageclient": "^7.0.0"
403+
"vscode-debugadapter": "^1.49.0",
404+
"vscode-languageclient": "^7.0.0"
397405
},
398406
"devDependencies": {
399407
"@types/glob": "^7.1.4",

robotcode/debugger/launcher/server.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ async def _launch(
135135
launcherTimeout: Optional[int] = None, # noqa: N803
136136
attachPython: Optional[bool] = False, # noqa: N803
137137
variables: Optional[Dict[str, Any]] = None,
138+
outputDir: Optional[str] = None,
138139
outputMessages: Optional[bool] = False,
139140
outputLog: Optional[bool] = False,
140141
groupOutput: Optional[bool] = False,
@@ -177,6 +178,9 @@ async def _launch(
177178

178179
run_args += ["--"]
179180

181+
if outputDir:
182+
run_args += ["-d", outputDir]
183+
180184
if robotPythonPath:
181185
for e in robotPythonPath:
182186
run_args += ["-P", e]

vscode-client/debugmanager.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ class RobotCodeDebugConfigurationProvider implements vscode.DebugConfigurationPr
4343
...(debugConfiguration.env ?? {}),
4444
};
4545

46+
debugConfiguration.outputDir =
47+
debugConfiguration?.outputDir ?? config.get<string | undefined>("robot.outputDir", undefined);
48+
4649
// if (pythonDebugpyPath) {
4750
// debugConfiguration.env = { PYTHONPATH: path.dirname(pythonDebugpyPath), ...debugConfiguration.env };
4851
// }

0 commit comments

Comments
 (0)