Skip to content

Commit 74b4e76

Browse files
committed
Allow configuring working directory and environment of launched process.
1 parent 2046b76 commit 74b4e76

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@
3737
"default": "${workspaceFolder}",
3838
"description": "Specifies the working directory for the launch command."
3939
},
40+
"rtlDebugger.env": {
41+
"type": "object",
42+
"patternProperties": {
43+
"": "string"
44+
},
45+
"default": {},
46+
"description": "Specifies the environment for the launch command."
47+
},
4048
"rtlDebugger.port": {
4149
"type": "integer",
4250
"minimum": 1,

src/debugger.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,11 @@ export class CXXRTLDebugger {
9191
const configuration = vscode.workspace.getConfiguration('rtlDebugger');
9292
if (configuration.command.length !== 0) {
9393
this.terminal = vscode.window.createTerminal({
94-
name: "CXXRTL Simulation",
94+
name: 'Simulation Process',
9595
shellPath: configuration.command[0],
9696
shellArgs: configuration.command.slice(1),
97+
cwd: configuration.cwd,
98+
env: configuration.env,
9799
isTransient: true,
98100
iconPath: new vscode.ThemeIcon('debug-console')
99101
});

0 commit comments

Comments
 (0)