title: Codeigniter + NetBeans + XDebug : Debugger not working after redirect()
body: <p>I am working on a project that uses <code>CodeIgniter</code>. I use <code>Netbeans</code> as my IDE and I have <code>Xdebug</code> installed. I am using <code>XAMPP</code> for local development.</p>
  
  <p><strong>What Works:</strong> Xdebug is working fine for <code>normal PHP code.</code> </p>
  
  <p><strong>Problem:</strong> However, I am facing problems debugging my <code>CodeIgniter</code> project. Debugger stops on a <code>redirect()</code></p>
  
  <p><strong>Problem Details:</strong> Start debugging project in netbeans. Debugger starts and we see homepage. On homepage, there is a link that corresponds to a method in homepage controller. <em>Debugger reaches the method in controller</em> to which the link points to. In this method there is a <code>redirect</code>. <strong><em>At the point of redirect debugger STOPS.</em></strong></p>
  
  <p><strong>Relevant Code Snippet(s):</strong></p>
  
  <p><em>URL That is clicked</em> (This is part of the header menu)</p>
  
  <pre><code>&lt;a href="&lt;?= base_url("somefunc/"); ?&gt;"&gt;Click Me &lt;/a&gt;
  </code></pre>
  
  <p><em>routes.php</em> - Reroute for prettier url.</p>
  
  <pre><code>$route['somefunc'] = "foo/somefunc";
  </code></pre>
  
  <p>And in my <em>Foo Controller</em> (foo.php):</p>
  
  <pre><code>class Foo extends CI_Controller {
      public function somefunc()
      {
          redirect('/bar/otherfunc');  // DEBUGGER REACHES TILL HERE THEN STOPS WORKING
      }
  }
  </code></pre>
  
  <p>As said above in the comment in <code>function somefunc()</code>, Xdebug stops working at the place where the redirect happens.</p>
  
  <p>Additionally, the following information might be of some use:</p>
  
  <p><strong>config.php</strong></p>
  
  <pre><code>$config['uri_protocol'] = 'AUTO'; // I have also tried PATH_INFO, QUERY_STRING, REQUEST_URI &amp; ORIG_PATH_INFO.
  $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
  $config['enable_query_strings'] = TRUE; // Have tried FALSE too.
  $config['index_page'] = ''; // Tried index.php too.
  </code></pre>
  
  <p><strong>xdebug</strong> settings in <code>php.ini</code></p>
  
  <pre><code>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
  </code></pre>
  
  <p><strong>NOTE</strong> - I have already tried playing around with different suggestions that I have seen here as well as through google but to no avail. Can somebody please point me in the right direction?</p>