注意:xdebug版本要支持PHP版本,不然就game over了,可以在phpinfo()中查看Xdebug是否安装成功 一、在php.ini配置调试信息(如果安装了zend debugger要注释掉其信息) ; XDEBUG Extension zend_extension = “D:/Web/wamp/bin/php/php5.3.8/zend_ext/php_xdebug-2.1.2-5.3-vc9-x86_64.dll”(注意中文字符,注意修改) [xdebug] ; 开启自动跟踪 xdebug.auto_trace = On xdebug.show_exception_trace = On ;xdebug.remote_autostart = On xdebug.collect_vars = On xdebug.collect_return = On xdebug.collect_params = On xdebug.trace_output_dir=”D:/Web/wamp/tmp” xdebug.profiler_enable=On xdebug.profiler_output_dir=”D:/Web/wamp/tmp” xdebug.remote_enable = true xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000 xdebug.remote_handler=dbgp xdebug.profiler_enable = off xdebug.profiler_enable_trigger = off xdebug.profiler_output_name = cachegrind.out.%t.%p xdebug.profiler_output_dir = “D:/Web/wamp/tmp” 2.在zend Stuido中配置xdebug 窗口 - 首选项 - PHP - Debug,将PHP Debugger 设置为Xdebug 3.在需要调试的文件上右键 打开调试窗口 ———————————- 所有的调试服务器配置都可以在 “窗口” -> “首选项” -> “PHP Servers” 中查看编辑 Edit Server Base URL:http://localhost Local Web Root:D:\Web\wamp\www Add new server path map Path on Server:http://localhost/pro/ThinkPHP3 或者物理地址 path in Workspace: /ThinkPHP3 最后一点,不要忘记在调试时启用单步执行过滤器哦,不然zend studio在用 xdebug 调试时可能就直接运行到结果 |
|