src/goInstallTools.ts: update install instructions for dlv-dap
Since dlv-dap is just dlv built at master and renamed, the standard
install instructions do not apply. Update to link to the documentation.
Also, look for dlv-dap tool instead of dlv when launching the dlv dap
process.
Updates golang/vscode-go#1395
Change-Id: I7639919594b1cbd753d09386794d0774f785122e
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/307054
Trust: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Suzy Mueller <suzmue@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
diff --git a/src/goDebugFactory.ts b/src/goDebugFactory.ts
index 8005199..0e207a4 100644
--- a/src/goDebugFactory.ts
+++ b/src/goDebugFactory.ts
@@ -275,12 +275,12 @@
const launchArgsEnv = launchArgs.env || {};
const env = Object.assign({}, process.env, launchArgsEnv);
- const dlvPath = launchArgs.dlvToolPath ?? getTool('dlv');
+ const dlvPath = launchArgs.dlvToolPath ?? getTool('dlv-dap');
if (!fs.existsSync(dlvPath)) {
const envPath = process.env['PATH'] || (process.platform === 'win32' ? process.env['Path'] : null);
logErr(
- `Couldn't find dlv at the Go tools path, ${process.env['GOPATH']}${
+ `Couldn't find dlv-dap at the Go tools path, ${process.env['GOPATH']}${
env['GOPATH'] ? ', ' + env['GOPATH'] : ''
} or ${envPath}`
);
diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts
index 287489e..4ea028e 100644
--- a/src/goInstallTools.ts
+++ b/src/goInstallTools.ts
@@ -354,8 +354,12 @@
// Offer the option to install all tools.
installOptions.push('Install All');
}
- const msg = `The "${tool.name}" command is not available.
+ let msg = `The "${tool.name}" command is not available.
Run "go get -v ${getImportPath(tool, goVersion)}" to install.`;
+ if (tool.name === 'dlv-dap') {
+ msg = `The "${tool.name}" command is not available.
+Installation instructions can be found at https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md#updating-dlv-dap.`;
+ }
const selected = await vscode.window.showErrorMessage(msg, ...installOptions);
switch (selected) {
case 'Install':