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:\wamp\php\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
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了..