php5中Xdebug配置安裝步驟介紹

來源:互聯網
上載者:User

Xdebug版本下載

http://www.xdebug.com/download.php

注意在下載Xdebug時我們必須查看自己php版本之後與xdebug一樣,並且要查看你的php是安全執行緒或非線程式安全的,否則可以沒有用哦。


下載好 php_xdebug.dll 之後我們複製到你的php ext目錄,如

D:/phpStudy/PHP5/ext/php_xdebug.dll

這個是我本地的,放好之後再把php.ini檔案進行修改,加入下面代碼

 代碼如下 複製代碼

[Xdebug]
zend_extension="D:/phpStudy/PHP5/ext/php_xdebug.dll"
xdebug.collect_return=1
xdebug.show_mem_delta=1
xdebug.show_exception_trace=1
xdebug.idekey="PHPStorm"
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.auto_trace=0  錯誤跟蹤提示0關閉,1開啟
xdebug.trace_output_name=%s.trace.log
xdebug.trace_output_dir="E:/XDebug/Trace"
xdebug.profiler_enable=0
xdebug.profiler_output_name=%s.profiler.log
xdebug.profiler_output_dir="E:/XDebug/Profiler"

好了最後一步重啟apache就可以解決了哦,然後我們來檢查一下Xdebug配置安裝是否成功了,我們在一個php測試一下phpinfo()

如果在截圖處可看到with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
就代碼成功了

現在我們測試一段代碼

是不是非常詳細的告訴我們錯誤資訊了呀。

聯繫我們

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