Debugging
This lesson discusses how errors can be tracked and removed when programming in Go.
We'll cover the following
Debuggers in Go
Application programming needs excellent debugging support. Most bigger IDEs provide this kind of support. To use the debugger in Visual Studio Code, you must currently manually install delve (see the Installation Instructions for full details). On macOS, it requires creating a self-signed cert to sign the dlv binary. An explanation on how to get running with debugging can be found here: Debugging Go Code Using VS Code. It is also possible to remotely debug code using VS Code; read Remote Debugging. Go can be debugged with GDB, and many editors support that. GoClipse has fully featured GDB debugger support (reusing Eclipse CDT’s GDB integration) comprising breakpoints and conditions, watch and view, disassembly view, viewing threads and stack frame contents. GoLand supports standard debugger features: Watches, Evaluate Expression, Show Inline Values and others. The debugger works for applications, as well as for tests.
Debugging strategy
Get hands-on with 1400+ tech skills courses.