安裝php xdebug調試工具及效能分析工具webgrind for windows

來源:互聯網
上載者:User

標籤:server   eve   官網   mil   static   查看   tps   堆棧   evel   

安裝php xdebug調試工具及效能分析工具webgrind for windows 

第一步:查看php版本等資訊

phpinfo();

上面是 x86 NTS VC14

 

第二步: 下載xdebug

官網 https://xdebug.org/ 

 

 

第三步:

下載擴充, 放入php的/ext 擴充目錄

 

第四步: php.ini 開啟擴充

 

配置其它選項:

[Xdebug]    

;指定Xdebug擴充檔案的絕對路徑

zend_extension="C:\App\php\php\php-7.0.12-nts\ext\php_xdebug-2.7.0alpha1-7.0-vc14-nts.dll"

;最大迴圈或調試次數,防止死迴圈

xdebug.max_nesting_level=50

;啟用效能檢測分析    

xdebug.profiler_enable=On  

;啟用代碼自動跟蹤    

xdebug.auto_trace=on  

;允許收集傳遞給函數的參數變數    

xdebug.collect_params=On  

;允許收集合函式調用的傳回值    

xdebug.collect_return=On  

;指定堆疊追蹤檔案的存放目錄    

xdebug.trace_output_dir="C:\App\php\debug"  

;指定效能分析檔案的存放目錄    

xdebug.profiler_output_dir="C:\App\php\debug"

;追加

xdebug.profiler_append=1

;指定追蹤檔案名稱格式

;xdebug.profiler_output_name = "cachegrind.out.%c"  

xdebug.profiler_output_name = "cachegrind.out.%s"  

;遠端偵錯是否開啟

xdebug.remote_enable = On

;連接埠  

xdebug.remote_port=9000  

;遠端偵錯地址

xdebug.remote_host = 127.0.0.1

;數組或對象最大層數 最大可設定1023

xdebug.var_display_max_depth = 10  

;將require,include相關載入的檔案名稱寫入追蹤檔案

xdebug.collect_includes=1

;堆棧追蹤

xdebug.default_enable=1

;列印請求方式

xdebug.dump.SERVER=REQUEST_METHOD

;列印GET請求參數

xdebug.dump.GET=*

;列印POST請求參數

xdebug.dump.POST=*

;列印COOKIE

;xdebug.dump.COOKIE=*

;列印UA

;xdebug.dump.SERVER=HTTP_USER_AGENT

 

配置好重啟伺服器

第五步: 使用

 

接下來使用xdebug的日誌分析工具分析

xdebug 日誌分析工具 webgrind v1.5

: https://github.com/jokkedk/webgrind

下載後如果是壓縮包解壓後 ,

 

開啟config.php 配置

 static $storageDir = ‘C:/App/php/debug‘; // 配置為xdebug xdebug.profiler_output_dir 所指的目錄

 

運行測試代碼後, 訪問webgrind的入口, 查看

 

/END

 

安裝php xdebug調試工具及效能分析工具webgrind for windows

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.