Delve is a third-party debugger for the Go programming language and it’s available on github https://github.com/go-delve/delve. It’s a valid alternative to the GDB golang debugger (https://golang.org/doc/gdb) as it’s more feature rich as mentioned in the official Go GDB website

By the end of this video you are going to be able to easily debug and inspect Go programs using the delve debugger command line tool. We are going to see how to view, add and change breakpoints in a Go program, navigate the program line by line or through breakpoints, inspect variables, functions and expressions values and finally analyse all our programs in detail.

Go Delve can be downloaded and installed by just using the go get command
Linux, Windows, OSX
$ go get github.com/go-delve/delve/cmd/dlv

If you are using Go modules you might want to execute this command outside your project directory to avoid delve being added as a dependency in your go.mod file

Once installed check your installation by typing
$ dlv version
Delve Debugger
Version: 1.5.1
Build: $Id: bca418ea7ae2a4dcda985e623625da727d4525b5 $

Golang Debugging with Delve - https://golang.cafe/blog/golang-debugging-with-delve.html

Source Code - https://play.golang.org/p/PZ5b_-_K1b5

💼 Golang Cafe - https://golang.cafe
📬 Golang Cafe Jobs Newsletter - https://golang.cafe/newsletter
🐦 Golang Cafe Twitter - https://twitter.com/golangcafe
📣 Telegram Channel - https://t.me/golangcafe

#golang #go #delve #debugging

Go (Golang) Debugging with Delve
1.60 GEEK