delve icon indicating copy to clipboard operation
delve copied to clipboard

Failed to continue: "Cannot find Delve debugger. Ensure it is in your `GOPATH/bin` or `PATH`."

Open shehantissera opened this issue 10 years ago • 10 comments

I am new to VSCode. I want to debug Golang with Delve. I have been searching for days about this issue and there is no proper documentation where I could get this working.

I have installed the required components as displayed on the following link here.

Finally on the instructions it says; 2) Make and install the dlv binary $ mingw32-make install

This seems to fail. the error I am getting on the command prompt is:

mingw32-make: *** No rule to make target 'install'. Stop.

Has anybody gone through this already? Please I need help.

shehantissera avatar Apr 25 '16 07:04 shehantissera

You probably just need to run the command from %GOPATH%/src/github.com/derekparker/delve/

aarzilli avatar Apr 25 '16 07:04 aarzilli

If you run

go get github.com/derekparker/delve/cmd/dlv

it will build dlv.exe and copy it into your %GOPATH%\bin directory.

Once that works, you would have to add %GOPATH%\bin directory to you PATH so VSCode (and other programs) can find dlv.exe. Alternatively you could copy dlv.exe from %GOPATH%\bin into another directory that is already in your PATH.

Alex

alexbrainman avatar Apr 25 '16 08:04 alexbrainman

Thanks alexbrainman! that worked!! This part is not available in any of the links I checked.

shehantissera avatar Apr 25 '16 08:04 shehantissera

Thanks @alexbrainman ! it worked!!

jay763190097 avatar Dec 30 '16 09:12 jay763190097

Still having this error:.. aw

My environment variables

GOPATH=C:\Users\ehoua\go
Path=[...];C:\Program Files (x86)\Microsoft VS Code\bin;C:\Go\bin;C:\Users\ehoua\go\bi

I setup dvelve as suggested in many websites: go get github.com/derekparker/delve/cmd/dlv

dlv.exe is located in C:\Users\ehoua\go\bin

My visual studio code Go files are located in: C:\Users\ehoua\Desktop\Github\EhouarnPerret.Go.Tour

But when attempting to debug a simple such as hello.go:

package main

import "fmt"

func main() {
	name := "Michelle"
	fmt.Println("Hello", name)
}

Still getting:

Failed to continue: "Cannot find Delve debugger. 
Ensure it is in your `GOPATH/bin` or `PATH`."

Any idea?

natalie-o-perret avatar Apr 08 '17 09:04 natalie-o-perret

thanks @alexbrainman; it worked!!

I just want to remind everyone, its need to configurate on your OS the "GOPATH" as @ehouarn-perret said.

vitordm avatar Jul 23 '17 14:07 vitordm

@ehouarn-perret ,I have the same problem as you。Did you solve it?

lwj-java avatar Oct 25 '17 03:10 lwj-java

I am a GO newbie. I am trying to install delve in VS Code using the install/update tools command. All the other tools install successfully but for delve I get the message:

Error: Command failed: C:\Go\bin\go.exe get -u -v github.com/derekparker/delve/cmd/dlv package github.com/derekparker/delve/cmd/dlv: directory "C:\Users\mark_s5\go\src\src\github.com\derekparker\delve\cmd\dlv" is not using a known version control system

Has any one seen/solved this issue.

Thanks, Mark

gershonsherman avatar May 01 '18 18:05 gershonsherman

https://github.com/Microsoft/vscode-go/wiki/Debugging-Go-code-using-VS-Code

could not launch process: exec: "lldb-server": executable file not found in $PATH This error can show up for Mac users using delve of version 0.12.2 or above. Not sure why, but doing a xcode-select --install has solved the problem for users who have seen this issue.

manish-jain-1 avatar Aug 06 '18 07:08 manish-jain-1

I have tried just about everything to solve this on macOS

  1. If I type dlv version in a terminal window I get the right version back
  2. dlv is in ~/go/bin
  3. PATH includes ~/go/bin
  4. GOPATH is set to ~/go
  5. I have added same PATH information in launch.json
  6. I have tried Xcode-select --install

Apparently vscode is loading this from someplace else

ghost avatar Oct 12 '18 16:10 ghost