PHPStorm+XDEBUG 調試Laravel


 首先輸出phpinfo();

 https://xdebug.org/wizard.php 打開然后查看適合你的調試擴展版本 ,目前支持到php7.2 

整個頁面ctrl+a  復制進去

然后下載 擴展文件 下載到 ext目錄下

 

 

 在你的php.ini末尾加上,擴展文件的路徑要注意  然后重啟apache

[Debug] zend_extension = C:\Code\XAMPP\php\ext\php_xdebug-2.6.1-7.2-vc15.dll xdebug.remote_enable = On xdebug.profiler_enable = On xdebug.profiler_enable_trigger = On xdebug.profiler_output_name = cachegrind.out.%t.%p xdebug.profiler_output_dir ="C:/wamp64/tmp" xdebug.show_local_vars=0 xdebug.var_display_max_children=128 xdebug.var_display_max_data=512 xdebug.var_display_max_depth=5 xdebug.idekey=PhpStorm xdebug.remote_enable = On xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000 xdebug.remote_handler=dbgp

 

 打開phpstrom 

 配置你的php環境

 

 

然后打開 Files->Settings->Languages->PHP->Servers  添加一個環境  host 一定要填你項目的環境

 

  Files->Settings->Languages->PHP->Debug

 

 

 

 

然后打開

 

 

 

 然后點擊小蟲子 打開的這個參數非常重要

 PHPStorm 監聽到了

 F8 單步調試 F7 進步方法 Shift+F8 跳出方法 常用的了

 結束

 

 

 

 

 

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM