Abstract: This chapter starts with the fundamental law of debugging and bug taxonomies, followed by tips for avoiding bugs. Techniques for planning for bugs include error logging, debug traces, assertions, and crash dumps. Specific tips are given for debugging the problems that arise, including techniques for reproducing bugs, debugging reproducible bugs, debugging nonreproducible bugs, debugging memory errors, and debugging multithreaded programs. The programs should contain features that enable easier debugging when the inevitable bugs arise. The chapter describes these features and presents sample implementations, where appropriate, that a C++ programmer can incorporate into his/her own programs. When debugging complicated problems, public error messages generally do not contain enough information. He/she often needs a complete trace of the code path taken, or values of variables before the bug showed up. The chapter concludes with a step-by-step debugging example.
Publication Year: 2018
Publication Date: 2018-02-19
Language: en
Type: other
Indexed In: ['crossref']
Access and Citation
AI Researcher Chatbot
Get quick answers to your questions about the article from our AI researcher chatbot