![]() Also make sure that the zend_extension part was not added automatically by the installation, if it was don't add it again. remote_host, this is the host where you develop and run your Eclipse, and PHP will try and connect to Eclipse when debugging is enabled. Zend_extension_ts="c:\\php\\ext\\php_xdebug-2.1."īe extra careful with xdebug. On Windows+PHP 5.2.14 I had to replace zend_extension with zend_extension_ts: Once the xdebug extension was installed, you will have to add the extension to php.ini. If the above does not work, check the Xdebug installation instructions at. You should be able to get it through PHP PECL with the following command: Next you will have to get and install xdebug on the machine where PHP runs(it can be the same machine or some remote machine). If you're not already using it, get your Eclipse PDT from and install it. My main goal in this post is to show you how to set your debugging environment with Eclipse PDT and Xdebug. This is the clean way to do it, it provides a much better insight into the source code, as you can run it interactively, step by step. Using proper debugging tools like Xdebug or the Zend Debugger, integrated into your PHP IDE.Also this is not exactly debugging, it's logging and analisyng the logs. This is cleaner than the previous method, but it requires additional effort and usually polutes the code with logging routines. Logging into files/database tables at specific points in the code.If you're using this there's nothing to be ashemed of, everyone is doing it. This will alter the output, it's quick but very dirty. The most straightforward technique is to use print_r() and var_dump().There are several ways to perform debugging in PHP: I find it very useful in a variety of situations, for instance when I want to understand how a routine works or I need to get rid of a bug that is not exactly easy to fix just by reading the code. Debugging is an invaluable part of software development.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |