I am working on a project that uses CodeIgniter . I use Netbeans as my IDE and I have Xdebug installed. I am using XAMPP for local development.
What works: Xdebug works great for normal PHP code.
Problem: However, I have to deal with problems debugging my CodeIgniter project. The debugger stops at redirect()
Problem Details: Run the debug project in netbeans. Debugging begins, and we see the home page. There is a link on the home page corresponding to the method in the home controller. The debugger reaches the method in the controller that the reference points to. There is redirect in this method. At the moment the STOPS debugger is redirected.
Relevant code fragments:
URL clicked (This is part of the header menu)
<a href="<?= base_url("somefunc/"); ?>">Click Me </a>
routes.php - redirection for a more beautiful URL.
$route['somefunc'] = "foo/somefunc";
And in my Foo Controller (foo.php):
class Foo extends CI_Controller { public function somefunc() { redirect('/bar/otherfunc');
As stated in the comment in function somefunc() above, Xdebug stops working where the redirect occurs.
In addition, you may need the following information:
config.php
$config['uri_protocol'] = 'AUTO'; // I have also tried PATH_INFO, QUERY_STRING, REQUEST_URI & ORIG_PATH_INFO. $config['permitted_uri_chars'] = 'az 0-9~%.:_\-'; $config['enable_query_strings'] = TRUE; // Have tried FALSE too. $config['index_page'] = ''; // Tried index.php too.
xdebug in php.ini
zend_extension ="path\to\xampp\php\ext\php_xdebug.dll" xdebug.remote_enable=on xdebug.remote_handler=dbgp xdebug.remote_host=localhost xdebug.remote_port=9000
NOTE I already tried playing with various offers that I saw here, as well as through google, but to no avail. Can someone point me in the right direction?