I want to remote debug Golang bin file with delve. First, I need to compile the .go file:
go build -gcflags='all -N -l' main.go
but the outcome is
invalid value "all -N -l" for flag -gcflags: missing =<value> in <pattern>=<value>
usage: build [-o output] [-i] [build flags] [packages]
Run 'go help build' for details.
How to solve this problem?
go version: 1.10.3 amd64/linux