paip.php 配置ZENDDEBUGGER 断点调试for cli..
作者Attilax , EMAIL:1466519819@qq.com
来源:attilax的专栏
地址:http://blog.csdn.net/attilax
需要用PHP写个命令行脚本..所以需要断点调试..
1.查看PHP版本号..
-------------
php.exe -h help..
php.exe -v
PHP 5.2.5 (cli) (built: Nov 8 2007 23:18:51)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
下载解压PHP5.2 版本的TS版的ZEND DEBUGGER
2.查看加载的Ini文件路径.
---------------------
php.exe --ini
3.php.ini增加ZEND DEBUGGER配置
----------------------------
[Zend]
zend_extension_ts=d:/ZendDebugger.dll
zend_debugger.allow_hosts=127.0.0.1
zend_debugger.expose_remotely=always
4.查看ZEND DEBUGGER配置是否成功...
---------------------------------------
D:wampphpphp.exe -v
PHP 5.2.5 (cli) (built: Nov 8 2007 23:18:51)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with Zend Debugger v5.2.15, Copyright (c) 1999-2008, by Zend Technologies
Error in my_thread_global_end(): 1 threads didn't exit
说明配置成功,可看到 with Zend Debugger v5.2.15
5.eclipse php3增加php executables
------------------------------------
eclipse php3 >setting> php >php executables>add a php exepath.... 顺便可指定PHP.INI路径..
6.开始调试SCRIPT
-----------
DEBUG>PHP SCRIPT ....
7.解决老是断点停留在第一行的问题
----------------------------------
DEBUG配置分为系统级,项目级,以及页面级..只要在页面级DEBUG设置更改,去掉..stop at first line就OK了..