PHP調試工具Xdebug安裝配置教程

來源:互聯網
上載者:User

標籤:

http://www.cnblogs.com/qiantuwuliang/archive/2011/01/23/1942382.html

 

Xdebug安裝提示:如果你不清楚安裝的PHP版本,你可以通過phpinfo()函數參看,同時Xdebug也提供了phpinfo輸出資訊分析工具來協助你分析如何安裝Xdebug,只要將phpinfo輸出資訊複製提交即可,地址:Xdebug phpinfo資訊分析地址    --   http://xdebug.org/wizard.php

Instructions
    1. Download xdebug-2.2.6.tgz
    2. Unpack the downloaded file with tar -xvzf xdebug-2.2.6.tgz
    3. Run: cd xdebug-2.2.6
    4. Run: phpize (See the FAQ if you don‘t have phpize.

      As part of its output it should show:

      Configuring for:...Zend Module Api No:      20090626Zend Extension Api No:   220090626

       

      If it does not, you are using the wrong phpize. Please follow this FAQ entry and skip the next step.

    5. Run: ./configure
    6. Run: make
    7. Run: cp modules/xdebug.so /usr/lib/php5/20090626+lfs
    8. Update /etc/php5/fpm/php.ini and change the line
      zend_extension = /usr/lib/php5/20090626+lfs/xdebug.so
    9. Restart the webserver

       

      Xdebug部分配置選項說明

        xdebug.auto_trace = 1

        是否允許Xdebug跟蹤函數調用,跟蹤資訊以檔案形式儲存,預設值為0

        collect_params = 1

        是否允許Xdebug跟蹤函數參數,預設值為0

        xdebug.collect_return = 1

        是否允許Xdebug跟蹤函數傳回值,預設值為0

        xdebug.profiler_enable = 1

        開啟xdebug的效能分析器,以檔案形式儲存,這項配置是不能以ini_set()函數配置的,預設值為0

        xdebug.profiler_output_dir

        效能分析檔案的存放位置,預設值為/tmp

        xdebug.profiler_output_name

        效能分析檔案的命名規則,預設值為cachegrind.out.%p

        xdebug.trace_output_dir

        函數調用跟蹤資訊輸出檔案目錄,預設值為/tmp

        xdebug.trace_output_name

        函數調用跟蹤資訊輸出檔案命名規則,預設為trace.%c

PHP調試工具Xdebug安裝配置教程

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.