I use Netbeans 6.7 and XDebug to debug a PHP site on my machine by running a query from Netbeans (Project-> Debug). This works great and is very useful.
My question is: is it possible to attach a debugger to any request that comes in, and not to those that I run from Netbeans?
that is, instead of clicking Debug, put Netbeans in debugger startup mode and attach to the next request that comes in.
I have a feeling that this might be a stupid question, but if possible, it will be great.
Edit: A little more information
My system (Ubuntu 9.04) is configured as follows:
Contents /etc/php5/conf.d/xdebug.ini
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
Netbeans PHP default debugging options:
Debugger Port: 9000 Session ID: netbeans-xdebug Stop at the First Line: ticked
My /etc/hosts redirects www.mywebsite.com files to localhost
If I click the debug button in Netbeans, then Firefox starts with the address http://www.mywebsite.com?XDEBUG_SESSION_START=netbeans-xdebug , and the debugger works as expected.
But if I just go to http://www.mywebsite.com?XDEBUG_SESSION_START=netbeans-xdebug , this will not lead to a debugger in Netbeans.
I also tried setting xdebug.remote_host=www.mywebsite.com , but that doesn't make any difference.
Also, I turned on xdebug.remote_log and showed information when I start with netbeans, but nothing for external requests. Therefore, I do not think XDebug sees external requests at all.