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

Commit

Permalink
Option to set backend for delve
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed May 3, 2017
1 parent 0d57112 commit 4beecf1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,15 @@
"type": "string",
"description": "Absolute path to a file containing environment variable definitions.",
"default": "${workspaceRoot}/.env"
},
"backend": {
"type": "string",
"enum": [
"default",
"native",
"lldb"
],
"description": "Backend used by delve. Only available in delve version 0.12.2 and above."
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion 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 {
trace?: boolean|'verbose';
/** Optional path to .env file. */
envFile?: string;
backend?: string;
}

process.on('uncaughtException', (err: any) => {
Expand Down Expand Up @@ -283,11 +284,13 @@ class Delve {
if (launchArgs.init) {
dlvArgs = dlvArgs.concat(['--init=' + launchArgs.init]);
}
if (launchArgs.backend) {
dlvArgs = dlvArgs.concat(['--backend=' + launchArgs.backend]);
}
if (launchArgs.args) {
dlvArgs = dlvArgs.concat(['--', ...launchArgs.args]);
}


this.debugProcess = spawn(dlv, dlvArgs, {
cwd: dlvCwd,
env,
Expand Down

0 comments on commit 4beecf1

Please sign in to comment.