Search code examples
gojetbrains-idegoland

decoding dwarf section info at offset 0x0: too short


I am using JetBrains GoLand and I am trying to debug my go file and I am getting the following error:

decoding dwarf section info at offset 0x0: too short

I tried to find an answer here at StackOverflow but unfortunately, I didn't get any solution.


Solution

  • GoLand ships with a bundled version of Delve. Update to 2018.2.2 and it should work. If you need to do remote debugging, then you need to update your Delve installation on/for the target machine as well (make sure you compile it with Go 1.11).

    Edit: There are two more possible cases where this issue can appear:

    • the application was compiled with all the debugging flags turned off and the additional debugging information stripped
    • the application uses the standard library "plugin" package, which is known to cause an issue in the Go compiler. This will be fixed in Go 1.12.