You might be asking yourself how a debugger can help to develop software and support the developer?
There are many kinds of different PHP projects out in the world and every project has its own requirements for debugging and quality insurance. But every project has common problems like the first implementation or the debugging of an old application when the original developer is not longer available! Commonly it requires a lot of time to set up a debugging / development environment or to analyse an existing PHP application. You have to install server and / or client software to do so, finally it will cost money and time.
Imagine there would be a single file which you can place in your web directory, include it into the program code before the first output comes and the only thing to do is to switch it on. You don't have to touch your server configuration, you don't have to install a client application or an over sized IDE (Integrated Development Environment) for this case. Only access to the web directory and a supported web browser is required, sounds beautiful?
If you like this imagination, you could understand the idea and the simplicity of the xn.debug function.
Most of the debuggers print their output directly into the HTML page and destroy the present layout, or cause problems by overlaying the original CSS-styles with their own. In order to avoid harming the present layout, the debugging output needs to be printed to a separate client software then.
The xn.debug outputs its data directly into a virtual debugging window inside the current HTML document, without affecting the page layout, and without the need for additional client software.
Did you ever experience debugging output inside a productive environment or at a customer presentation? Then you know how convenient it could be to disable all this kind of messages with a central switch! The debugger is build to work only if you want him to work. Not only the output will be hidden, the whole function will refuse the work and just give back what it takes, with nearly none performance lost. So if you decide to measure your PHP performance with an external tool, you can switch of the debugger and will get realistic results.
There is no need to remove every single debug function call from your application. You can remove them when you go live with your application or just replace the debug function with a simple mockup function which returns the first argument. This makes it very easy to write the function call in a single line or just around a functions argument inline.
This tool is developed to optimize the development process and to support the developer. Sparing the developer to be tied up with maintenance will save time and money!