標籤:
Xdebug在PHP中的安裝配置涉及php.ini設定檔的修改。
1 首先需要下載Xdebug,根據安裝的PHP版本,選擇合適的Xdebug版本,
2 安裝Xdebug
將下載的php_xdebug-2.1.0-5.3-vc6.dll複製到PHP安裝目錄下的ext目錄,ext目錄專門用來存放PHP擴充庫DLL檔案。
3 配置php.ini
安裝Xdebug的最後一步就是配置php.ini檔案,開啟C:\php目錄下的php.ini設定檔,在末尾添加
[Xdebug];模組路徑zend_extension="D:/amp/php/ext/php_xdebug-2.2.6-5.3-vc9.dll";是否開啟自動跟蹤xdebug.auto_trace=On;是否收集參數xdebug.collect_params=On;是否收集傳回值xdebug.collect_return=On;是否開啟調試內容xdebug.profiler_enable=Onxdebug.profiler_enable_trigger = On;跟蹤輸出路徑xdebug.trace_output_dir="D:\amp\apache\htdocs\xdebug\trace";調試輸出路徑xdebug.profiler_output_dir="D:\amp\apache\htdocs\xdebug\profiler"xdebug.profiler_output_name = cachegrind.out.%t.%p;是否開啟遠端偵錯xdebug.remote_enable=On;允許調試的用戶端IPxdebug.remote_host=127.0.0.1;遠端偵錯的連接埠(預設9000)xdebug.remote_port=9000;調試外掛程式dbgpxdebug.remote_handler=dbgp;是否開啟異常跟蹤xdebug.show_exception_trace=On;是否開啟遠端偵錯自動啟動xdebug.remote_autostart=On;是否收集變數xdebug.collect_vars=On
Xdebug在PHP中的安裝配置