CS241: Spring 2015 -- Lecture 9, debugging
Debugging
- Why Murphy's Law is false.
- A buggy life program
- On understanding the problem
- Many details, any one can trip you.
- On knowing when you know (metaknowlege)
- Class diagram.
- Q: The address of an Object foo? A: foo.hashCode()!
- Housekeeping
- Naming conventions
- Why format?
- Managing the windows
- souts and text
- Edit/Find in Projects
- Like a treasure hunt?
- Can't fix what you can't find!
- Hypothesis and testing
- This or that?
- When "impossible" things happen...
- souts
- Do we get wherever?
- What's in the variables?
- The debugger
- Starting
- Setting/unsetting breakpoints
- Step over, step into
- The Variables tab
- Inspecting variables by hovering
- Continue to next breakpoint
- The call stack (under Windows/Debugging)