前提:項目使用xampp集成
一、下載xdebug,當(dāng)?shù)絰ampp/php/exp目錄下
?二、配置php.ini
[Xdebug]
zend_extension="D:/xampp/php/ext/php_xdebug.dll"
xdebug.collect_params=On
xdebug.collect_return=On
xdebug.auto_trace=On
xdebug.trace_output_dir="D:\xampp\php\tmp\xdebug"
xdebug.profiler_enable=On
xdebug.profiler_enable_trigger=On
xdebug.profiler_output_dir="D:\xampp\php\tmp\xdebug"
#如果開啟此,將忽略下面的 xdebug.remote_host 的參數(shù)。 <一臺webserver有多個開發(fā)者的工作目錄的時候使用,如:p1.xx.com,p2.xx.com,p3.xx.com 。。。等。 >
xdebug.remote_connect_back = On
#允許遠(yuǎn)程調(diào)試
xdebug.remote_enable=On
#遠(yuǎn)程調(diào)試地址
xdebug.remote_host=127.0.0.1
#遠(yuǎn)程調(diào)試端口
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
#調(diào)試器的關(guān)鍵字
xdebug.idekey=PHPSTORM
三、啟動xampp
四、配置phpstorm
(一)、【File】-【Settings】-【Languages&Frameworks】-【PHP】
?
(二)、【File】-【Settings】-【Languages&Frameworks】-【PHP】-【Debug】
(三)、【File】-【Settings】-【Languages&Frameworks】-【PHP】-【Debug】-【DBGp Proxy】
(四)、【File】-【Settings】-【Languages&Frameworks】-【PHP】-【Server】
?(五)、【Edit Configurations】
?1、【+】-【PHP Web Page】
2、
?(六)、【Run】-【W(wǎng)eb Server Debug Validation】
?【Validate】出現(xiàn)以下為正確:
文章來源:http://www.zghlxwxcb.cn/news/detail-480472.html
五、訪問頁面即可debug文章來源地址http://www.zghlxwxcb.cn/news/detail-480472.html
到了這里,關(guān)于phpstorm+xdebug/php項目調(diào)試的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!