From the course: Debugging in Go

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Exec: Debug precompiled binaries

Exec: Debug precompiled binaries - Go Tutorial

From the course: Debugging in Go

Exec: Debug precompiled binaries

- [Instructor] There are various different methods that you can use in order to start a debugging session using Delve. Each of these different methods have their own pros and cons and specific use cases. The method that we're going to talk about today is exec. Starting a new debug session using exec is very useful if you want to start a session using a pre-compiled binary that you already have on your local file system. The exec method is very useful if you have a complicated build process or you want to debug a binary that was maybe compiled somewhere else and given to you. While this method is very handy and super powerful, there are a few considerations that you should keep in mind. First, if the binary that you're trying to debug has been stripped of any debug symbols, you might find that certain functionality within the debugger will not work, such as printing the value of variables. Second, if the binary was compiled without any additional flags to disable optimizations, by…

Contents