Using XDebug with CodeIgniter |
[eluser]Neovive[/eluser]
Here are some notes summarizing the process I utilized to get the Zend Debugger working with Eclipse PDT on WAMP server. It's pieced together from various sites and some postings in the CI forum. I haven't tried it in a few months. If it works, I will add it to the Wiki. The Zend Debugger is available for free and seems to integrate better with Eclipse PDT than XDebug. the process eventually worked, but it was hard to get much value out of the debugger, since CI routes everything through the front controller. Installing Eclipse PDT v1 with Zend Debugger on WAMP Server for Code Igniter 1) Download and install WAMP Server from http://www.wampserver.com/en/ 2) Download the Debugger Extension from Zend Downloads (http://downloads.zend.com/pdt/server-debugger/) You need to download the Debugger Extension packet for the appropriate operating system. Unpack the zipped packet and take the dll (or so) file which matches the PHP version you have currently running. E.g. for PHP 5.2.0 the correct file is ZendDebugger.dll inside 5_2_x_comp directory. 3) Unzip the proper ZendDebugger.dll and copy to C:\wamp\php\ext 4) Add the following lines to your php.ini file: zend_extension_ts=c:/wamp/php/ext/ZendDebugger.dll zend_debugger.allow_hosts=127.0.0.1,list.your.ip.addresses [add comma separated list of all applicable ip's for development server] zend_debugger.expose_remotely=always 5) Restart server and create a <?=phpinfo();?> script. You should see a "With Zend Debugger ....." under the Powered By Zend logo. 6) In CI update the application/config.php as follows: $config['enable_query_strings'] = TRUE; $config['permitted_uri_chars'] = ''; 7) In CI update the system/libraries/Router.php (as per http://ellislab.com/forums/viewthread/59944/) line 288 Code: function _get_uri_string() 8) Right-click on index.php file in Eclipse and choose "Debug as PHP Webpage" 9) Configure Debug Properties: (click on debug button and and select "Debug Dialog") Make sure "Zend" is set as the server debugger Set the URL to your homepage: (e.g. http://localhost/index.php) Advanced: "Debug All Pages" Leave "Break at first line" 10) Run through the debug once (it will give a 404 Not Found the first time), then open Firefox and launch your URL. This will automatically trigger the debugger in Eclipse and it should work from the browser. Use "Step Into" to watch CI work it's magic. References: 1) PDT Wiki: Installing the Zend Debugger http://www.thierryb.net/pdtwiki/index.ph...d_Debugger 2) CI: http://ellislab.com/forums/viewthread/59359/ http://ellislab.com/forums/viewthread/59944/ 3) PDT Wiki: Source level debugging and Zend Firefox Extension http://www.thierryb.net/pdtwiki/index.ph..._Debugging |
Messages In This Thread |
Using XDebug with CodeIgniter - by El Forum - 01-08-2008, 12:23 PM
Using XDebug with CodeIgniter - by El Forum - 01-08-2008, 02:06 PM
Using XDebug with CodeIgniter - by El Forum - 01-14-2008, 07:41 AM
Using XDebug with CodeIgniter - by El Forum - 01-14-2008, 09:19 AM
Using XDebug with CodeIgniter - by El Forum - 01-26-2009, 06:42 AM
|