鍍金池/ 問答/PHP  網(wǎng)絡(luò)安全/ xdebug報(bào)這個(gè)“waiting for incoming connectio

xdebug報(bào)這個(gè)“waiting for incoming connection with ide key”,怎么辦

框架的入口文件打斷點(diǎn)能打印出來;

clipboard.png

但是,其他文件里打斷點(diǎn)就不行了,

clipboard.png

我沒用chrome的插件xdebug helper,但是用了好像也不行,求助;

補(bǔ)充

phpstorm的配置

clipboard.png

clipboard.png

clipboard.png

clipboard.png

php.ini里xdebug模塊的配置

clipboard.png

回答
編輯回答
殘淚

其實(shí)你這樣應(yīng)該是可以打斷點(diǎn)了,只是必須從入口文件開始而已??梢栽谛枰獢帱c(diǎn)的地方打上斷點(diǎn),然后斷點(diǎn)進(jìn)入入口文件后,單擊一下phpstorm的綠色箭頭就可以跳到打上斷點(diǎn)的地方了。

xdebug的配置并沒有什么問題,問題應(yīng)該出在Chrome的插件,用這個(gè)插件的時(shí)候,每次有斷點(diǎn)的請(qǐng)求都會(huì)發(fā)送一個(gè)xdebug的參數(shù),值是一個(gè)數(shù)字,你應(yīng)該是沒有這個(gè)參數(shù)才導(dǎo)致的這個(gè)報(bào)錯(cuò)。

其實(shí)xdebug完全可以不依賴瀏覽器的插件就可以打斷點(diǎn),使用xdeubg.remote_autostart配置即可。

zend_extension=xdebug.so
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.idekey = phpstorm
xdebug.remote_connect_back = 1
xdebug.remote_port = 9999
xdebug.remote_handler = dbgp
xdebug.remote_log=/var/log/php/xdebug.log

以上是我的xdebug配置。
然后不需要配置configuration,配置好phpstorm的xdebug端口,然后增加一個(gè)server,配置好server對(duì)應(yīng)的域名即可。

希望對(duì)你能有所幫助。

2017年11月15日 13:25