Debugging code
In the Creating a frontend upload form recipe, we went through the execution of the script line by line. When writing your own code, you would probably want the same benefit, giving you the ability to go through execution line by line, and seeing exactly what is happening. This functionality is provided by debuggers.
There are several debuggers available for PHP for any platform. Most debuggers are bundled with an IDE, so that you can use them together. For example, NuSphere PhpEd comes with DBG debugger, which we will make use of in this recipe.
Getting ready
This recipe assumes you have NuSphere PhpEd installed on your Windows computer. If you don't skip ahead to the There's more... section for general tips on using debuggers, which you can then apply to a debugger of your choice.
Note
For more information about NuSphere PhpEd, go to http://www.nusphere.com/.
How to do it...
1. Go to
C:\Program Files\nusphere\phped\debugger\server
(or equivalent installation path).2. Select the...