最近開發發現自己電腦var_dump時候沒有如下效果。並且輸出的數據編程一坨坨的,很難直觀的判斷。
解決辦法:
添加xdebug方法如下:
根據自己的PHP版本去下載一個php_xdebug.dll文件。(一般PHP的集成開發環境都有,只需要把對應的服務開啓就好。)
找到php.ini文件。
在末尾添加如下:
; XDEBUG Extension
zend_extension = "D:/wamp/bin/php/php5.3.27/zend_ext/php_xdebug-2.2.0-5.3-vc9.dll"
[xdebug]
xdebug.remote_enable = on
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.remote_port = 9001
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "D:/wamp/tmp"
重啓apache服務。