1. 打開 eclipse for php IDE,window->preference->PHP->Debug
2. 配置phpserver
3. 我的已經增加好了,默認的應該有localhost之類的,你只需要點擊編輯或者新增就行
3. 配置PHPExcuteables
4. 新增或者編輯
5. 增加瀏覽器中的xdebug helper,下載谷歌瀏覽器的xdebug helper插件,然后點擊瀏覽器的工具欄設置
這樣就配置好了
6. 新鍵一個PHP項目
在項目里面建立一個PHP的index.php
然后通過開啟xdebug helper 訪問瀏覽器 http://www.eclipsephp.com/test/index.php eclipse就會出現斷點調試信息
最后:請配置php.ini
;xdebug start
[XDebug] xdebug.profiler_output_dir="E:\phpStudy\PHPTutorial\tmp\xdebug" xdebug.trace_output_dir="E:\phpStudy\PHPTutorial\tmp\xdebug" zend_extension="../ext/php_xdebug.dll" xdebug.remote_enable = On xdebug.remote_handler = dbgp ;啟動性能檢測分析 xdebug.profiler_enable = On ;啟動代碼自動跟蹤 xdebug.auto_trace=On xdebug.profiler_enable_trigger = On xdebug.profiler_output_name = cachegrind.out.%t.%p ;指定性能分析文件的存放目錄 xdebug.profiler_output_dir ="E:/xdebug/tmp" xdebug.show_local_vars=0 ;配置端口和監聽的域名 xdebug.remote_port=9000 xdebug.remote_host="localhost" xdebug.idekey = PHPSTORM
;xdebug end
[zend debug]
這段配置通用於phpstorm,這里需要配置一個 php_xdebug.dll 的插件。