Skip to content

Commit

Permalink
Allow configuring working directory and environment of launched process.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Oct 7, 2024
1 parent 2046b76 commit 74b4e76
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@
"default": "${workspaceFolder}",
"description": "Specifies the working directory for the launch command."
},
"rtlDebugger.env": {
"type": "object",
"patternProperties": {
"": "string"
},
"default": {},
"description": "Specifies the environment for the launch command."
},
"rtlDebugger.port": {
"type": "integer",
"minimum": 1,
Expand Down
4 changes: 3 additions & 1 deletion src/debugger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,11 @@ export class CXXRTLDebugger {
const configuration = vscode.workspace.getConfiguration('rtlDebugger');
if (configuration.command.length !== 0) {
this.terminal = vscode.window.createTerminal({
name: "CXXRTL Simulation",
name: 'Simulation Process',
shellPath: configuration.command[0],
shellArgs: configuration.command.slice(1),
cwd: configuration.cwd,
env: configuration.env,
isTransient: true,
iconPath: new vscode.ThemeIcon('debug-console')
});
Expand Down

0 comments on commit 74b4e76

Please sign in to comment.