70 likes | 169 Views
Debugging (some advanced stuff). Please snarf the example code we’ll be using today – it’s Mike’s Debugging Example Also get a piece of paper. War Story. Debugging. Snarf the code for today’s class. What We Will Do Today. How To Use The Debugger
E N D
Debugging (some advanced stuff) Please snarf the example code we’ll be using today – it’s Mike’s Debugging Example Also get a piece of paper
Debugging Snarf the code for today’s class
What We Will Do Today • How To Use The Debugger • Mike’s Thoughts on Debugging Hard to Debug Bugs • A debugging challenge
Iron Law of Debugging • Do not assume you know what or where the problem is • Gather data on the problem • When you understand the problem, the fix is obvious
How to Debug Hard to Debug Bugs Two things to do: • Get more information about the bug. • Change your reproduction environment so you can get more information about the bug Remember: you can’t get stuck.
Imagine you’re a programmer working for a company that sells stuff online. Your vendors submit 300 megabyte XML files that describe their project inventory, which you then process and turn into webpages. You are trying to get a new vendor onboard…but your boss tells you that everytime they upload their feed, they get an error message saying “An unknown error has occurred processing your feed. Please contact technical support.” Get more information about the bug. Change your reproduction environment so you can get more information about the bug