Debugging
or, why don't more computer users know how to do so?
I try to be helpful, really; that said, it's horribly hard to not want to crack skulls when people who are using computers aren't familiar with simple debugging. Imagine walking into your house and flipping on the power switch, but your lights do not turn on. What do you do? Do you race to IRC to ask why your lights didn't turn on? or do you use some basic debugging to presume that either the bulb is dead, your power is out, or the wires/switch are bad? Naturally, there could be other sources of trouble, but at least eliminating the most simple of these before racing for help will make people far less likely to strangle you.
This document released for use under the PPL license available at http://code.dayid.org/ppl/ppl.txt
simple
simplify
simplify the problem
simplify the problem until it is small
Simplify your problem until it is so small that the solution shows itself.
- What is the easiest possible solution to "error, see log"?
- Check the log.
- What is the easiest possible solution to "error, cannot connect"?
- Is the server/daemon running? If no, fix. If yes, continue.
- Can you connect to it from its localhost? (e.g., from the server itself. hint: telnet) If no, fix. If yes, continue
- Do you have a firewall blocking it on the server end? If yes, fix. If no, continue
- What is the easiest possible solution to "error, permission denied"?
- Well, what are the permissions for the file in question? (hint: ls -l, stat)
- What about owner/group?
- What about the parent dir(s)?
- Is the service that gets the error inside a chroot?
- What is the easiest possible solution to "error, cannot bind to port X"?
- Do you have permission to bind to that port?
- Is something already bound to that port? (hint: the same program you are trying to get to bind to it now perhaps did not stop all the way or in time for the new process to start?)
|