當我用xdebug使用常規localhost/domain時,xdebug工作正常。不過,我也在我的本地機器上設置了虛擬主機,所以如果我使用xdebug並在域中調用。 test.domain.com。 xdebug掛起。XDEBUG掛在虛擬主機域
我的確發現了一些線索。在我的php.ini
文件中,如果我將xdebug.remote_host=localhost
更改爲xdebug.remote_host=vhost_domain_name
。有用。所以我想問題是,我可以爲xdebug設置多個虛擬域來尋找。
[編輯]
我很抱歉。我沒有發佈我的設置:P。沒意識到它。
zend_extension ="/usr/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.remote_enable=1
xdebug.profiler_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.profiler_output_dir="/tmp"
這個相關的問題可能會有所幫助:http://stackoverflow.com/questions/6165360/seeking-virtual-machine-with-xdebug-working-for-php-in-netbeans – 2012-02-23 16:36:55