Download presentation
Presentation is loading. Please wait.
1
Debugging at Scale
2
How to Debug At Scale Lesson 1: Don’t Test with small problems first
Try to reproduce big problems at small scale In a big program, comment out parts, slowly add them back
3
How to Debug At Scale Lesson 2: Location of Bug != Location of Error
This code crashes on line 25 Where is the bug?
4
How to Debug At Scale Lesson 2: Location of Bug != Location of Error
Error prone code Pointing to things (what is lifespan of thing?) Deleting memory Copying things (deep copy??) What error prone code ran shortly before the bug?
5
How to Debug At Scale Lesson 2: Location of Bug != Location of Error
Finding your error Run in debug mode so you know where you crash Put in break points or print statements to see: How far you get If your data is still valid Use binary search
6
How to Debug At Scale Lesson 3: Conditional Breakpoints
Ignore first X hits of breakpoint Stop when code expression is true
7
How to Debug At Scale Lesson 4: Print It Out
Reading a log can be easier than using debugger Print out Entering a particular function All parameters to each recursive call All information about current loop iteration Redirect output to a text file: myProgram.exe > output.txt
8
How to Debug At Scale Print It Out Tip Make a log function:
You can turn off:
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.