简体   繁体   中英

Setting up Xdebug for drupal site

I have been trying to get xdebug, netbeabs 7.0 and drupal work to no avail. The drupal site is hosted remotely on xyz.com:8081. The port forwarding is setup to forward the port 9000 to the host in that network. xdebug is installed and correctly shows up in phpinfo() but my netbeans says "waiting for connection (netbeans-xdebug)". Below is what I have in my php.ini

zend_extension="/usr/lib/php5/20090626+lfs/xdebug.so"
xdebug.remote_connect_back=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp

also I read some where that I have to have the same in my /etc/php5/cli/conf.d/xdebug.ini and I tried that too.I tried change the localhost to xyz.com and it didn't work. I also need to know what should be the project configuration in netbeans. for instance xyz:8081/drupal?

Thank you all,

Xdebug needs to connect back to your workstation on the port specified. Try something like this. The key is that the server will connect back to your workstation, so if you're behind a nat'd firewall then you need to port forward 9000 to your workstation running netbeans.

xdebug.remote_enable=1
xdebug.remote_mode=req
xdebug.remote_port=9000
xdebug.idekey=NETBEANS_DBGP
xdebug.remote_handler=dbgp
xdebug.remote_host=IP_OF_YOUR_WORKSTATON

Some of these settings are described in more detail here: http://www.flingbits.com/tutorial/view/xdebug-for-developing-debugging-and-profiling-php

There's also netbeans specific setup info here: http://wiki.netbeans.org/HowToConfigureXDebug

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM