Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,14 @@
"items": {
"type": "string"
}
},
"env": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "%%harbour.launch.env%",
"default": {}
},
"stopOnEntry": {
"type": "boolean",
Expand Down
1 change: 1 addition & 0 deletions client/package.nls.es.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"harbour.launch.workspaceRoot": "el atributo 'workspaceRoot' está en desuso, use 'sourcePaths'",
"harbour.launch.program": "Ruta absoluta del ejecutable",
"harbour.launch.workingDir": "Directorio de trabajo",
"harbour.launch.env": "Variables de entorno pasadas al programa.",
"harbour.launch.arguments": "Argumentos a pasars al ejecutable",
"harbour.launch.stopOnEntry": "Detener automáticamente después de comenzar",
"harbour.launch.sourcePaths": "Rutas para buscar código fuente",
Expand Down
1 change: 1 addition & 0 deletions client/package.nls.it.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"harbour.launch.workspaceRoot": "l'attributo 'workspaceRoot' è in disuso, usa 'sourcePaths'",
"harbour.launch.program": "Percorso assoluto dell'eseguibile",
"harbour.launch.workingDir": "Directory di lavoro",
"harbour.launch.env": "Variabili di ambiente passate al programma.",
"harbour.launch.arguments": "Argomenti da passare all'eseguibile",
"harbour.launch.stopOnEntry": "Fermati automaticamente dopo l'avvio",
"harbour.launch.sourcePaths": "Percorsi dove cercare i sorgenti",
Expand Down
1 change: 1 addition & 0 deletions client/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"harbour.launch.workspaceRoot": "Attribute 'workspaceRoot' is deprecated, use 'sourcePaths' instead",
"harbour.launch.program": "Absolute path of executable",
"harbour.launch.workingDir": "Working directory",
"harbour.launch.env": "Environment variables passed to the program.",
"harbour.launch.arguments": "Arguments to pass to executable",
"harbour.launch.stopOnEntry": "Automatically stop after launch",
"harbour.launch.sourcePaths": "Directories where search for source files",
Expand Down
5 changes: 3 additions & 2 deletions client/src/debugger.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ class harbourDebugSession extends debugadapter.DebugSession {
this.runInTerminalRequest({
"kind": args.terminalType,
"cwd": args.workingDir,
"env": args.env,
"args": [args.program].concat(args.arguments ? args.arguments : [])
}, undefined, runResp =>{
if(runResp && runResp.body && runResp.body.processId) {
Expand All @@ -210,9 +211,9 @@ class harbourDebugSession extends debugadapter.DebugSession {
default:
var process;
if (args.arguments)
process = cp.spawn(args.program, args.arguments, { cwd: args.workingDir });
process = cp.spawn(args.program, args.arguments, { cwd: args.workingDir, env: args.env });
else
process = cp.spawn(args.program, { cwd: args.workingDir });
process = cp.spawn(args.program, { cwd: args.workingDir, env: args.env });
process.on("error", e => {
tc.sendEvent(new debugadapter.OutputEvent(localize("harbour.dbgError1", args.program, args.workingDir), "stderr"))
tc.sendEvent(new debugadapter.TerminatedEvent());
Expand Down