Random Link ¯\_(ツ)_/¯ | ||
Jul 2, 2022 | » | Debugging
7 min; updated Sep 5, 2022
Debugging 101 Definition? Debugging involves inspecting a program’s internal state. printf Debugging and Logging In printf debugging, one adds print statements and keeps iterating until enough information has been extracted. Using logging has several advantages over printf debugging: varying logging destinations (e.g. standard output, files, sockets, remote servers, etc.); severity levels (e.g. INFO, DEBUG, WARN, ERROR, &c) that support filtering of output; color-coding for readability. Terminals have varying levels of color support: plain color; ANSI escape codes (16 color codes with bold/italic and background); 256 color palette; 24-bit truecolor (“888” colors, aka 16 million, e.... |