I’ve been using this method in Ubuntu 15.04 for about 4 weeks. It’s early days and by far an ideal solution. However, it has worked really well for me…
The latest build of the Go plugin for IntelliJ now incorporates the Delve package. If you don’t have a JetBrains IDE you can download the free Community Edition of IntelliJ.
Install the Go plugin by first adding the pre-release repository. Inside the editor you’ll see you can now create breakpoints in Go projects by clicking on the left gutter of the editor.
After setting a breakpoint create a run/debug configuration. The lazy way to create a configuration is to right click in the editor and choose Debug from the context menu. The default configuration will probably not work first time. To fix edit the run/debug configuration and ensure the Name field contains a simple name without spaces or periods. Also set the Output Directory local to the project. I also set the Working Directory so that relative paths to assets in web applications can work.
There is a bit more information about debugging a Go project in the Go plugin wiki.
Do you have any tips for interactively debugger Go in Linux, Mac or Windows? Please share your experiences below.