Debugging CI with Eclipse pdt |
[eluser]noCodeMonkeys[/eluser]
I have just setup eclipse/ptd/xdebug (Galileo). I have gotten the debugger to work. However I am at a loss as to how to debug the CI projects. I am not sure what file to work with. When I try to debug the view or controller files they run and show up in pdt, but it ignores breakpoints and doesn't really debug. I have two projects setup in pdt, one points to systems and one to applications. I moved the applications folder up one directory and modified the path in index.php. This is the setup suggested by Stefano in a thread started 1-17-2008 entitled CI plugin for eclipse. Can anyone offer direction in this regard? I have spen waaaaaay too much time on this so if anyone can offer any help I will be very grateful.
[eluser]Colin Williams[/eluser]
Your entry point to CI is the front controller, which is the index.php file that CI ships with.
[eluser]noCodeMonkeys[/eluser]
Thanks for your reply. If I open index.php in the debugger, how does that get me to the pages I actually need to debug?
[eluser]Colin Williams[/eluser]
You might need to trick CI into knowing where to go. In index.php, try something like Code: $_SERVER['PATH_INFO'] = 'path/i/want/to/debug';
[eluser]noCodeMonkeys[/eluser]
Thanks. That makes sense. I'll it and post the result.
[eluser]Sinclair[/eluser]
[quote author="noCodeMonkeys" date="1263799378"]I have just setup eclipse/ptd/xdebug (Galileo). I have gotten the debugger to work. However I am at a loss as to how to debug the CI projects. I am not sure what file to work with. When I try to debug the view or controller files they run and show up in pdt, but it ignores breakpoints and doesn't really debug. I have two projects setup in pdt, one points to systems and one to applications. I moved the applications folder up one directory and modified the path in index.php. This is the setup suggested by Stefano in a thread started 1-17-2008 entitled CI plugin for eclipse. Can anyone offer direction in this regard? I have spen waaaaaay too much time on this so if anyone can offer any help I will be very grateful.[/quote] Hi, I need to setup a Debug environment for codeigniter. Do you have information on how to configure eclipse/ptd/xdebug (Galileo)? Best Regards,
[eluser]gorfdo[/eluser]
Here is how I got xdebug to work with CI -- I am using xampp as local server; Assuming you have debugging working in config.php set $config['uri_protocol;] = "AUTO" $config['enable_query_strings'] = TRUE; in /library/uri.php in function _fetch_uri_string() below "if (strtoupper($this->config->item('uri_protocol')) == 'AUTO') {" add " if(preg_match("/debug/i",$_SERVER['QUERY_STRING'])){ $_GET = array(''); $_SERVER['QUERY_STRING'] = ''; }" (make sure to add after opening { of if statemnt) now go to the debug perspective click on the debug dropdown and go to debug configurations click on "php webpage" and select new at the top enter a name select xdebug add a new php server -- give it a name, and enter the url http://xampp_program_path browser to the file -- index.php break at first line do not autogenerate the url, enter the url of the page you want to debug the system should have url:and the url you entered for the php server, then you add the part of the url after. click debug and you sould break at the first line.
[eluser]noCodeMonkeys[/eluser]
For those who need to confgure Eclipse pdt with Xdebug. I am running VIsta64bit on iis7 test server. This is the most complete and accurate description of how to that I have seen. You have to register with IBM to get the info but IMHO it's well worth it. http://www.ibm.com/developerworks/edu/os...debug.html |
Welcome Guest, Not a member yet? Register Sign In |