Debugging a PHP application if often more difficult than debugging an application in some other programming language. There are two reasons for this.
[ PHP developers have many good IDEs to choose from. See the InfoWorld Test Center's comparison of ActiveState Komodo, CodeLobster, Eclipse PDT, phpDesigner, NetBeans, NuSphere PhpED, PHPEdit, and Zend Studio. ]
Second, a PHP Web application does not have a continuous, linear flow of execution. Its execution is a series of HTTP request/response transactions. Each transaction is independent of all other preceding and following request/response pairs. While it is true that, from a user's perspective, the application gives the impression of a monolithic unity, that effect is maintained by artifacts such as cookies or hidden fields. The presence of such artifacts does not inform the debugger of a transaction-spanning Web session.
The upshot is that, if you start a debug session on file X.PHP, when X.PHP sends its HTTP response, that PHP code is completed. A subsequent HTTP request in the same user session might trigger the execution of file Y.PHP. Consequently, a single user session effectively passes through multiple debug sessions.
Developers can deal with the "multiple languages" issue using a collection of debug tools, each outfitted for its particular domain. A PHP debugger "extension" handles debugging PHP code. One of the most popular extensions is the Xdebug, a free PHP debugger, which is installed as a dynamic link library on Windows or as a shared library on Linux. Xdebug can be used with virtually any Web server, because it is attached to the PHP runtime and not the Web server.