Zend Studio下的PHP代码调试
问题:Zend Studio无法调试php代码
安装Zend Debugger
下载
到http://downloads.zend.com/pdt/server-debugger下载最新的debugger
下载后将zip解压缩。得到一个目录:有x_x_x_comp和x_x_x_nts_comp,x指版本号,nts指non thread safe,使用phpinfo查看你的php安装版本和thread safe属性,
配置
1、请将ZendDebugger.dll复制到您的php安装目录下,比如:你的php根目录/ext/
行内容加到您的php.ini:
[Zend]
zend_extension_ts=C:/wamp/bin/php/php5.2.9-2/ZendDebugger.dll
;此处ts代理线程安全
zend_debugger.allow_hosts=127.0.0.1
zend_debugger.expose_remotely=always
其中,127.0.0.1是远程调试的文件所在机器的IP;我是本地web调试
3、将dummy.php复制到apache的document root目录。
4、重启apache。
5.到Zend Studio的Tools->preferences->debug下核对一下设置是正确的
6.测试Debugger是否成功
问题:Test Debugger报错
“A timeout occurred when the debug server attempter to connect to the following client hosts/IPS”
所以注意了:如果你的php版本是5.3以上,且是thread safe的,那么不要浪费你的时间做尝试,建议你直接改用XDebug吧。以下官方给出的解释。
The Debugger we provide supports only the non-thread-safe architecture, that is why it does not load in your configuration.
Zend stopped supporting the thread safe architecture when Microsoft also decided to implement its PHP engine with the fast-cgi architecture which means non-thread-safe.
Best regards,
Massi.
任务:XDebug安装
到http://xdebug.org/download.php选择自己需要的xdebug版本。
下载并解压到自己需要的位置。
在php.ini中加入
|
zend_extension_ts="你的php根目录/ext/php_xdebug.dll" |
如果不行改用
|
zend_extension="你的php根目录/ext/php_xdebug.dll" |
然后重启apache通过phpinfo()输出并查找xdebug是否被成功加载。
问题:XDebug无法进入断点
在php.ini中加入
|
;开启自动跟踪 |
|
|
xdebug.auto_trace = On |
|
|
;开启异常跟踪 |
|
|
xdebug.show_exception_trace = On |
|
|
;开启远程调试自动启动 |
|
|
xdebug.remote_autostart = On |
|
|
;开启远程调试 |
|
|
xdebug.remote_enable = On |
|
|
;收集变量 |
|
|
xdebug.collect_vars = On |
|
|
;收集返回值 |
|
|
xdebug.collect_return = On |
|
|
;收集参数 |
|
|
xdebug.collect_params = On |
|
|
xdebug.trace_output_dir="e:/xampp/temp" |
|
|
xdebug.profiler_enable=On |
|
|
xdebug.profiler_output_dir=" e:/xampp/temp" |
|
|
xdebug.remote_host=localhost |
|
|
xdebug.remote_port=9000 |
|
|
xdebug.remote_handler=dbgp |
Zend Studio下的PHP代码调试的更多相关文章
- Zend Studio下调试PHP的一点注意事项
Zend Studio默认php文件的存放路径是你配置的服务器的路径,比如你配置的服务器是localhost,那么,你在zend下建立的文件均是相对于localhost而言的,比如你新建一个php工程 ...
- 彻底解决zend studio 下 assignment in condition警告
最近在mac系统下安装zend studio作为php开发工具,把以前的代码导入,发现项目中有很多 “assignment in condition”的警告,造成原因是在条件判断的if.while中使 ...
- Android studio下将项目代码上传至github包括更新,同步,创建依赖
AS中设置GIT 一.开篇 本文讲如何使用Android Studio将项目上传到github,虽然讲上传github的文章很多,但是大部分都是使用Git Bash命令行,虽然效率高些,但是有点麻烦, ...
- 使用zend studio配置Xdebug调试PHP教程
这里看过上面的文章后写一下自己的想法. 最近安装了zend studio 10.5,下载了破解文件.开始是下载了10.0的版本,但是注册码不正确.所以只能安装最新的10.5了. 接下来进行PHP代码调 ...
- 【Zend Studio】在Zend Studio中调试ThinkPhp框架
在这篇文章中,笔者将会展示如何在Zend Studio下进行断点调试Think PHP.环境:windows 7.wampServer 3.1.4 64bit.zend studio 13.6.1Th ...
- Debian(Linux)+XAMPP(LAMPP)+Zend Studio + PHP +XDebug 完整的开发环境配置方法。 转摘:http://www.cnblogs.com/kungfupanda/archive/2010/11/25/1887812.html
经历了3天左右的挣扎,终于在Linux下将 php开发工具 Zend Studio 的 xdebug安装成功,分享如下: 1,装XAMPP,安装方法链接如下:这里假设XAMPP的安装路径为:/opt/ ...
- xampp环境下,配置Zend Studio调试php(XDebug) 转摘:http://www.cnblogs.com/tuyithief/archive/2011/06/02/2068431.html
先说一下文件版本,xampp 1.7.4,php 5.3.5. 走了很多弯路,截止目前,ZendDebugger在php 5.3.x下,只有nts版本,既non Thread Safety(具体什么意 ...
- Zend Studio集成Xdebug断点调试详解
转自:http://www.softown.cn/post/115.html Xdebug是PHP开发中两个常用的断点调试工具之一(另一个为Zend Debugger). 现在,我们在Zend Stu ...
- Zend Studio 12.0.2正式版发布和破解方法,zend studio 12.0.1汉化,相式设置为Dreamweaver,空格缩进为4个, 代码默认不折叠的设置,Outline中使用的图形标志,代码颜色之eot设置。
背景:zend studio 12.0.2 修复了一个12.0.1的: Fixed problem with referenced variables marked as undefined,我都说 ...
随机推荐
- Leetcode--572. Subtree of Another Tree(easy)
Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and no ...
- QT7有用的尝试总结(1)
1,系统配置 1. 把系统相关的一些目录配置 写到qt.conf文件里,详细情况情参考QSettings里的qt.conf部分 You can use the qt.conf file to over ...
- curl工具介绍和常用命令
curl是利用URL语法在命令行方式下工作的开源文件传输工具.它被广泛应用在Unix.Linux发行版中,并且有DOS和Win32.Win64的移植版本.curl是一个利用URL规则在命令行下工作的文 ...
- poj 3321 单点更新 区间求和
Apple Tree Time Limit: 2000 MS Memory Limit: 65536 KB 64-bit integer IO format: %I64d , %I64u Java c ...
- Linux下SVN配置hook经验总结
前几天给实验室搭建了一个内部测试的开发环境,LAMP.svn提交以及自动部署. 之前没干过这事儿,到最终搞定还是颇费了些周折.总结一下我的经验,主要是hook的自动执行问题. 拿我的post-comm ...
- java基础梳理
- [POI2015]LOG(树状数组)
今天考试考了这题,所以来贡献\([POI2015]LOG\)的第一篇题解.代码略丑,调了快三个小时才调出来\(AC\)代码. 对于这种小清新数据结构题,所以我觉得树状数组才是这道题的正确打开方式. 首 ...
- 01_python_初始python
一.初始python python是一门解释型语言,弱类型语言 / python解释器最为常用的是cpython(官方) 弱类型语言: a = 1 a = 'alex' #说明变量a既可以是整 ...
- 跟着刚哥学习Spring框架--Spring容器(二)
Spring容器 启动Spring容器(实例化容器) -- IOC容器读取Bean配置创建Bean实例之前,必须对它进行实例化(加载启动),这样才可以从容器中获取Bean的实例并使用. Bean是S ...
- Swift5 语言参考(四) 表达式
在Swift中,有四种表达式:前缀表达式,二进制表达式,主表达式和后缀表达式.评估表达式会返回一个值,导致副作用,或两者兼而有之. 前缀和二进制表达式允许您将运算符应用于较小的表达式.主要表达式在概念 ...