phpstorm - xdebug

重點說明!!

phpstorm如果出現一切配置都成功,但是watches沒有任何的變量,任何調試數據信息,則說明 php版本與phpstorm不兼容!因此需要更換phpstorm版本

php.ini配置xdebug

[Xdebug]
zend_extension=D:/soft/phpstudy_pro/Extensions/php/php7.2.9nts/ext/php_xdebug.dll
xdebug.collect_params=1
xdebug.collect_return=1
xdebug.auto_trace=Off
xdebug.trace_output_dir=D:/soft/phpstudy_pro/Extensions/php_log/php7.2.9nts.xdebug.trace
xdebug.profiler_enable=Off
xdebug.profiler_output_dir=D:/soft/phpstudy_pro/Extensions/php_log/php7.2.9nts.xdebug.profiler
xdebug.remote_enable=On
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9666
xdebug.remote_handler=dbgp

 

phpstorm-->file-->setting

phpstorm:  Run->Edit Configurations

1. 啓動phpstorm的server 監聽 上面配置的9666的端口

2. 點擊2 給某個代碼打斷點

3. 打開瀏覽器,訪問這個代碼的url路徑 並帶一個參數 ?XDEBUG_SESSION_START=15934

4. php的xdebug 得到?XDEBUG_SESSION_START=15934這個標識知道您在調試,然後把調試信息 發送到 9666端口

5. phpstorm 得到調試信息,在下面顯示相關調試信息

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章