Download
chapter 11 debugging techniques n.
Skip this Video
Loading SlideShow in 5 Seconds..
Chapter 11 Debugging Techniques PowerPoint Presentation
Download Presentation
Chapter 11 Debugging Techniques

Chapter 11 Debugging Techniques

0 Views Download Presentation
Download Presentation

Chapter 11 Debugging Techniques

- - - - - - - - - - - - - - - - - - - - - - - - - - - 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