|
|
|
|
Debugging Tutorial, Part 2
The summary of this lesson on basic debugging is to check your error logs.
This is part 2 of my tutorial on basic debugging techniques. (See also debugging, part 1)
Error logs can tell you alot. We often forget to check them, especially when we are frustrated. Error logs can help you
figure out why your program is not working.
Sometimes the problem is something really amazingly stupid such as a typo in a path. It happens to the most experienced of programmers.
For development, you use your own computer, referred to as "localhost," rather than a live web server.
On localhost, Apache error logs are simple to check.
The location of the file that contains the error messages
might vary from the following instructions depending on your installation and version of Apache. For many installations on Windows
computers, look for it at
C:\Program Files\Apache Group\Apache\logs\error.log
Add a shortcut to the file to your desktop so you can check the file easily.
The most common type of email I receive starts out "I can't get my program to run, please help." Remember to check your error
logs for clues. And please read my Introduction to Debugging. It's not fun banging
your head against a wall when you can't get a program to run. Use these tips and hopefully you will save yourself some time and headaches.
|