How to use dlv to debug beats with version 6.7.0+

I'm using beats version 6.7.0, it has 1.10.8 in .go-version, so I use go 1.10.8 to build it.
Building is fine and binaries run well.

But when I try to use dlv to debug a beat binary (auditbeat), it shows to me:

could not launch process: could not get .debug_frame section: could not find .debug_frame section

googled and found the reason could be beats uses plugin and go version > 1.10 won't have .debug_frame in binary if plugin is used.
here's a link ( missing debug_frame section if package plugin is imported) for this issue.
Another link ( support eh_frame if debug_frame is not present) for the issue

I tried to write a simple go package without plugin, dlv runs well on it.

So my question is, how to debug beats codes (version > 6.7.0)

I tried to use go 1.12.4 to build beats 6.7.0, same issue.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.