Xdebug+ZendStudio配置,xdebugzendstudio_PHP教程

來源:互聯網
上載者:User

Xdebug+ZendStudio配置,xdebugzendstudio


原文連結:http://www.orlion.ga/689/

好久之前就知道有這麼個東西,但是一直沒用,一直用exit()、var_dump() debug,效率很低。

首先下載xdebug的dll檔案(Window環境下)網址是:https://xdebug.org/download.php,此次下載的是php_xdebug-2.3.3-5.5-vc11-x86_64.dll。(這是個安全執行緒版的)下載完成後放到php安裝目錄的ext檔案夾下。然後再配置php.ini添加這麼幾行:

XDEBUG Extensionzend_extension="C:\wamp\bin\php\php5.5.12\ext\php_xdebug-2.3.3-5.5-vc11-x86_64.dll";允許遠程IDE調試xdebug.remote_enable=true;遠程主機xdebug.remote_host=127.0.0.1xdebug.profiler_enable=on;臨時跟蹤資訊輸出;xdebug.trace_output_dir="C:\wamp\xdebug\trace";xdebug.profiler_output_dir="C:\wamp\xdebug\profiler"xdebug.auto_trace=On;開啟異常跟蹤xdebug.show_exception_trace=On;開啟遠端偵錯自動啟動xdebug.remote_autostart=On;收集變數xdebug.collect_vars=On;收集傳回值xdebug.collect_return=On;收集參數xdebug.collect_params=On;顯示局部變數xdebug.show_local_vars=On;顯示預設的錯誤資訊xdebug.default_enable=On;用於zend studio遠端偵錯的應用程式層通訊協定xdebug.remote_handler=dbgp;如果設得太小,函數中有遞迴調用自身次數太多時會報超過最大嵌套數錯xdebug.max_nesting_level=10000

可參考:http://www.cnblogs.com/dreamhome/p/3218744.html,http://blog.csdn.net/xinzheng_wang/article/details/37930233

然後配置ZendStudio(這裡是ZendStudio 12.5.1):

    1. Window->Preferences->PHP->PHP Executables->Add如下:

    2. Window->Preferences->PHP->Debug:

      中的PHP Server:wamp_apache是之前配置好的,最好配置一個

    3. 然後就可以建立檔案加斷點,然後檔案右鍵->Debug as->PHP CLI Application。

http://www.bkjia.com/PHPjc/1116296.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/1116296.htmlTechArticleXdebug+ZendStudio配置,xdebugzendstudio 原文連結:http://www.orlion.ga/689/ 好久之前就知道有這麼個東西,但是一直沒用,一直用exit()、var_dump() debug,...

  • 聯繫我們

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