Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Add the output option for the delve (#1564)
Browse files Browse the repository at this point in the history
* Add the output option to the delve

* Add output default value to package.json
  • Loading branch information
trknhr authored and ramya-rao-a committed Mar 18, 2018
1 parent d5eebb3 commit 3a1067c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,11 @@
"lldb"
],
"description": "Backend used by delve. Only available in delve version 0.12.2 and above."
},
"output": {
"type": "string",
"description": "Output path for the bynary of delve",
"default": "debug"
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/debugAdapter/goDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ interface LaunchRequestArguments extends DebugProtocol.LaunchRequestArguments {
/** Optional path to .env file. */
envFile?: string;
backend?: string;
output?: string;
}

process.on('uncaughtException', (err: any) => {
Expand Down Expand Up @@ -301,6 +302,9 @@ class Delve {
if (launchArgs.backend) {
dlvArgs = dlvArgs.concat(['--backend=' + launchArgs.backend]);
}
if (launchArgs.output && mode === 'debug') {
dlvArgs = dlvArgs.concat(['--output=' + launchArgs.output]);
}
if (launchArgs.args) {
dlvArgs = dlvArgs.concat(['--', ...launchArgs.args]);
}
Expand Down

0 comments on commit 3a1067c

Please sign in to comment.