Godebug and the Wonders of Code Generation
Debuggers are great, but none of the existing Go debuggers worked in Jeremy Schlatter's environment. And so he wrote his own.
godebug doesn't inspect binary files or depend on low-level OS operations. Instead, it modifies your program's source code and runs it as a normal executable.
This talk covers:
• An outline of godebug
• Using the Go standard libraries to generate code
• How to trace individual goroutines as they execute a program
• What goes wrong when you generate functions that wrap existing code
• Inserting code inside else-if/switch initializers, the easy way and the hard way
This video was recorded at the GoSF meetup at Thumbtack in SF.