Failed to continue: "Cannot find Delve debugger. Ensure it is in your `GOPATH/bin` or `PATH`."
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.
You probably just need to run the command from %GOPATH%/src/github.com/derekparker/delve/
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
Thanks alexbrainman! that worked!! This part is not available in any of the links I checked.
Thanks @alexbrainman ! it worked!!
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?
thanks @alexbrainman; it worked!!
I just want to remind everyone, its need to configurate on your OS the "GOPATH" as @ehouarn-perret said.
@ehouarn-perret ,I have the same problem as you。Did you solve it?
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
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.
I have tried just about everything to solve this on macOS
- If I type dlv version in a terminal window I get the right version back
- dlv is in ~/go/bin
- PATH includes ~/go/bin
- GOPATH is set to ~/go
- I have added same PATH information in launch.json
- I have tried Xcode-select --install
Apparently vscode is loading this from someplace else