Note that there are some explanatory texts on larger screens.

plurals
  1. POLaunch XDebug in Netbeans on an external request
    text
    copied!<p>I'm using Netbeans 6.7 and XDebug to debug a PHP site on my machine, launching the request from within Netbeans (Project->Debug). This works fine, and is very useful.</p> <p>My question is: Is it possible to attach the debugger to any request that comes in, rather just those I launch from within Netbeans?</p> <p>ie, instead of clicking "Debug", put Netbeans into a mode whereby the debugger is launched and attaches to the next request that comes in.</p> <p>I have a feeling this may be a stupid question, but if it is possible, that'd be great.</p> <p><strong>Edit:</strong> A bit more information</p> <p>My system (Ubuntu 9.04) is set up as follows:</p> <p>Contents of <code>/etc/php5/conf.d/xdebug.ini</code></p> <pre><code>zend_extension=/usr/lib/php5/20060613/xdebug.so xdebug.remote_enable=on xdebug.remote_handler=dbgp xdebug.remote_mode=req xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.idekey=netbeans-xdebug </code></pre> <p>Netbeans PHP debugging options are at the defaults:</p> <pre><code>Debugger Port: 9000 Session ID: netbeans-xdebug Stop at the First Line: ticked </code></pre> <p>My <code>/etc/hosts</code> file redirects <code>www.mywebsite.com</code> to <code>localhost</code></p> <p>If I click on the debug button in Netbeans, then Firefox is launched with the address <code>http://www.mywebsite.com?XDEBUG_SESSION_START=netbeans-xdebug</code>, and the debugger works as expected.</p> <p>But if I just browse to <code>http://www.mywebsite.com?XDEBUG_SESSION_START=netbeans-xdebug</code>, this doesn't start the debugger in Netbeans.</p> <p>I've also tried setting <code>xdebug.remote_host=www.mywebsite.com</code> , but that makes no difference.</p> <p>Also, I've enabled <code>xdebug.remote_log</code>, and that's showing information for when I start from within netbeans, but nothing for external requests. So I don't think XDebug is seeing the external requests at all.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload