March 2020
Intermediate to advanced
406 pages
8h 39m
English
GODEBUG is the controller of the variables and is used for debugging within the Go runtime. This variable contains a list of name=val key-value pairs, separated by commas. These named variables are used to tune the output of the debugging information the binary will return. One of the nice things about this variable is that the runtime allows you to apply this directly to a precompiled binary, rather than invoking it at build time. This is nice because it allows you to debug a binary that has already been built (and potentially already causing harm in a production environment). The variables you can pass to GODEBUG are as follows:
| GODEBUG variables | Enable value | Description |
| allocfreetrace | 1 | Used in order to profile every allocation. ... |
Read now
Unlock full access