Search code examples
gomagic-numbersdelve

could not launch process: invalid magic number in record at byte 0x0 Delve Golang


Just got a:

could not launch process: invalid magic number in record at byte 0x0

When running on OSX after working fine for a while:

dlv debug main.go

reinstalled Delve, but still persists. What can it be?


Solution

  • The problem was the name of the package, I changed it and worked. Delve should give a better error message for that case.

    Previously I had a custom name for the package name. After changing it to main delve started to work again.