delve

Debugger for the Go programming language

brewmacoslinux
Try with needOr install directly
Source

About

Debugger for the Go programming language

Commands

dlv

Examples

Debug a Go program by starting the debugger$ dlv debug ./main.go
Set a breakpoint and run until it's hit$ dlv debug ./main.go -- arg1 arg2
Attach debugger to a running process$ dlv attach <pid>