1:打開php.ini文件。../xampp/php/php.iniphp
2:在文件末尾有一個:[XDebug] html
3:這裏是配置和啓用xdebug的位置服務器
4.[XDebug] 下面的配置項前面有一個;號。分號 表示註釋app
5:刪除全部分號,啓用xdubug編輯器
6.在netbeans 編輯器中新建一個index.php.內容以下:ui
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> spa
<html> debug
<head> 調試
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> code
<title></title>
</head>
<body>
<?php
// put your code here
phpinfo();
?>
</body>
</html>
運行index.php文件,ctral+a選中頁面所有信息 複製下來 粘貼到 http://xdebug.org/wizard.php
如:
粘貼完成後 點擊 analyse my phpinfo() output 按鈕
7:更具提示下載相應版本的xdebug
8:下載完成後將:php_xdebug-2.2.5-5.5-vc11.dll複製到 C:\xampp\php\ext目錄下面;
9:php.ini文件中de[XDebug]標籤後面加上一行(取消前面的分號):
zend_extension = "C:\xampp\php\ext\php_xdebug-2.2.5-5.5-vc11.dll"
到此步已安裝完成:重啓服務器,運行index.php出現以下狀況則安裝成功:
開始配置:
在php.ini中的[XDebug]標籤後面編輯已下代碼:
zend_extension = "C:\xampp\php\ext\php_xdebug-2.2.5-5.5-vc11.dll"
xdebug.auto_trace =1
xdebug.collect_params=1
xdebug.collect_return=1
xdebug.trace_output_dir = "C:\xampp\tmp"
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = "C:\xampp\tmp"
;zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 1
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
保存 重啓服務器。
打開php項目 設置斷點 開始調試;菜單欄出現已下圖標則配置成功。就能夠開始調試了。