zend studio8.x下的调试-zenddeugger的安装配置,以及xdebug的使用

1.下载ZendDebugger.dll

http://download.csdn.net/download/wm5920/4677516

2.在服务器目录下新建一个phpinfo.php,内容如下:

<?php
phpinfo();
?>

在浏览器地址栏下输入http://localhost/phpinfo.php查看配置信息,

找到Loaded Configuration File对应的配置文件打开并在最后一行添加如下代码:

[Zend]
zend_extension_ts="F:/xdebug/ZendDebugger.dll"
zend_debugger.allow_hosts=127.0.0.1/10
zend_debugger.expose_remotely=always      

其中zend_extension_ts对应你下载的ZendDebugger.dll所存放的目录

3.重启apache,刷新http://localhost/phpinfo.php,你会看到如下信息

表示安装成功!

4.配置Installed Debuggers

打开菜单栏windows-preference-PHP-Debug-Installed Debuggers,点击configue,配置如下

5.拷贝dummy.php文件到根目录下,与phpinfo.php在同一目录下,也可以自己写个php文件,只要写上如下代码:

<?php
@ini_set('zend_monitor.enable', 0);
if(@function_exists('output_cache_disable')) {
	@output_cache_disable();
}
if(isset($_GET['debugger_connect']) && $_GET['debugger_connect'] == 1) {
	if(function_exists('debugger_connect'))  {
		debugger_connect();
		exit();
	} else {
		echo "No connector is installed.";
	}
}
?>


6.调试时以php web page调试,点击Test Debugger会弹出success提示框,至此配置完成!

7.xdebug

php.ini配置信息

[xdebug]
xdebug.auto_trace = on
xdebug.collect_params = on
xdebug.collect_return = on
xdebug.trace_output_dir = "F:/xdebug/trace"
xdebug.profiler_enable = on
xdebug.profiler_output_dir = "F:/xdebug/profiler"
xdebug.remote_enable = on
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
xdebug.remote_handler = dbgp
xdebug.extended_info = on

用phpinfo()查看安装信息

8.用wincachegrind查看Xdebug调试信息

打开后点击Tools->options,设定你的working folder(php.ini里xdebug.profiler_output_dir的值C:\Temp\xdebug)这样就可以比较直观的查看效能监测文件的信息了。

9.关于xdebug的“Unexpected termination of script, debugging ended”

看一下错误的描述

You can also type in an expression by right-clicking inside the Expressions view and selecting “Add Watch Expression”.
Important Note: There appears to be a bug when you try to launch a debug session with existing Watch Expressions. You get an error “Unexpected termination of script, debugging ended”. To avoid this error, just delete all Watch expressions, using the “Remove All Expressions” button in the toolbar, prior to starting a new debug session.
To finish up, delete the Watch expression and press the red Terminate button to stop the debug session.

这种问题至今没有解决。。。。,还好这种错误出现的不是非常频繁,有足够调试的时间

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值