介紹xdebug在PHPSTORM中的配置

下面由phpstorm教程欄目給大家介紹xdebug在phpstorm中的配置,希望對需要的朋友有所幫助!

介紹xdebug在PHPSTORM中的配置

php的配置:開啟xdebug

1.在php.ini文件的xdebug配置部分加入如下配置選項。主要的含義是設置phpstorm調試客戶端的地址、端口號和表示等。

   xdebug.remote_enable = on     xdebug.auto_trace = on    xdebug.remote_handler=dbgp    xdebug.remote_host=localhost    xdebug.remote_port=9000    xdebug.idekey=PHPSTORM

配置完成后,打開phpstorm,設置(setting)php的解析器,此時應可以看到已安裝了xdebug擴展,否則檢查配置文件。

介紹xdebug在PHPSTORM中的配置

立即學習PHP免費學習筆記(深入)”;

2.調試單個PHP文件 ?
調試單個PHP文件,需要配置DBgp參數,與xdebug的配置參數一致即可。如下圖所示。
介紹xdebug在PHPSTORM中的配置

之后在run>edit configurations中選擇php script即可調試單個php文件。

? 版權聲明
THE END
喜歡就支持一下吧
點贊13 分享