Why Am I Seeing the 'Decoding Dwarf Section Info at Offset 0x0: Too Short' Error When Debugging Go in GoLand?

Barbara Streisand
Release: 2024-11-06 11:54:02
Original
867 people have browsed it

Why Am I Seeing the

Debugging Go with GoLand: "Decoding Dwarf Section Info at Offset 0x0: Too Short" Error

When attempting to debug a Go program in JetBrains GoLand, you may encounter the error: "decoding dwarf section info at offset 0x0: too short." This error indicates that the debugger is unable to decode the debug information in the compiled executable.

Solution:

The root cause of this issue lies in the bundled version of Delve that ships with GoLand. To resolve the error, update GoLand to version 2018.2.2 or later. Additionally, if remote debugging is required, ensure that Delve is updated on the target machine and compiled with Go 1.11.

Other Potential Causes:

In some cases, this error can also arise due to:

  • Compiling the application without debug flags, which strips debugging information.
  • Using the "plugin" package from the standard library, which can introduce an issue in the Go compiler. This issue will be addressed in Go 1.12.

The above is the detailed content of Why Am I Seeing the 'Decoding Dwarf Section Info at Offset 0x0: Too Short' Error When Debugging Go in GoLand?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template