1 / 7

Chapter 11 Debugging Techniques

Chapter 11 Debugging Techniques. Date: 2008/05/08. Four strategies. Don’t re-invent the wheel. Develop and test your code incrementally. Code defensively. Include debugging code. Program bugs. Syntactic errors ex. cout << “hello”; count << “hello”; error Semantic errors

lauracortez
Télécharger la présentation

Chapter 11 Debugging Techniques

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 11 Debugging Techniques Date: 2008/05/08

  2. Four strategies • Don’t re-invent the wheel. • Develop and test your code incrementally. • Code defensively. • Include debugging code.

  3. Program bugs • Syntactic errors • ex. cout << “hello”; count << “hello”; error • Semantic errors • ex. char array[5]; array=“school”; error • Sometimes the program terminates abnormally.

  4. Debug(1/2) • Starting Debug  F5 • Step over  F10 • Step In  F11 • Debug toolbar • Tools  customize

  5. Debug(2/2) • Debug windows can help us debug. • Debug  windows (while Debugging) • Autos • Output • Callstack • Watch • Error Lists • Breakpoints ……

  6. Breakpoints • A breakpoint is a point in your program where the debugger automatically suspends execution. • Set condition

  7. Adding Debug code • Solution Configuration • Debug • Release • #ifdef _DEBUG //Debug code #endif

More Related