While PHP does not come with built-in debugging or profiling, an open-source project has existed almost as long as PHP to provide that functionality: Xdebug. Created and maintained by PHP core developer Derick Rethans, it offers remote debugging, stack traces, profiling, and more. It is a project that anyone doing PHP development would benefit from using.
Source: LWN.net – [$] PHP Debugging using Xdebug