Delve(dlv)无法附加到进程

I'm getting this error back from dlv

could not attach to pid 20727: decoding dwarf section info at offset 0x0: too short

The binary is built in this way:

go build -a -v -ldflags "-w -X main.gitCommit=<sha> -linkmode 'auto' -extldflags '-static'"

Could you confirm that is the -w flag that cause the following issue? Does it strip the debug symbol?

After I've removed the -w flag delve was able to attach to the process