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

Add the output option for the delve #1564

Merged
merged 2 commits into from
Mar 18, 2018
Merged
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
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",
Copy link

@levrik levrik Apr 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo bynary -> binary

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is fixed in master

"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