- Install dlv https://github.com/go-delve/delve/tree/master/Documentation/installation
- Compile the binary
go build main.go
- Run dlv in headless mode
dlv exec ./main --headless --listen=127.0.0.1:50034
- Run debugger, you should be able to debug normally
- Stop debugger, and launch it again with mirrord enabled