<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>简单生活@NET &#187; xdebug</title>
	<atom:link href="http://lee.kometo.com/archives/tag/xdebug/feed" rel="self" type="application/rss+xml" />
	<link>http://lee.kometo.com</link>
	<description>正确的判断来自经验，但经验往往来自错误的判断</description>
	<lastBuildDate>Tue, 10 Aug 2010 11:01:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>使用Xdebug调试PHP程序</title>
		<link>http://lee.kometo.com/archives/296</link>
		<comments>http://lee.kometo.com/archives/296#comments</comments>
		<pubDate>Wed, 01 Jul 2009 15:33:39 +0000</pubDate>
		<dc:creator>kometo</dc:creator>
				<category><![CDATA[WEB应用开发]]></category>
		<category><![CDATA[深入PHP]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[xdebug]]></category>

		<guid isPermaLink="false">http://lee.kometo.com/?p=296</guid>
		<description><![CDATA[XDebug是个好东西啊，用来调试PHP程序的，可以和Eclipse配合。 配置步骤：（Windows+Apache+php环境） 1.下载和PHP版本环境相适应的XDebug版本，放置于PHP目录，主要None-ThreadSafe版似乎是用来在CLI方式下使用的，一般不需要 2.修改php.ini文件，参考如下 [Xdebug] ;zend_extension_ts = "D:\server\php5\ext\php_xdebug-2.0.5-5.3-vc6.dll" ;发现在PHP5.3+Apache（CGI）方式下，似乎必须使用 zend_extension 加载才能成功 zend_extension = "D:\server\php5\ext\php_xdebug-2.0.5-5.3-vc6-nts.dll" xdebug.auto_trace = off ;开启自动跟踪 xdebug.remote_autostart = off ;开启远程调试自动启动 xdebug.remote_enable = 1 xdebug.remote_host = 10.5.184.251 xdebug.remote_port = 9000 ;xdebug.remote_handler = “dbgp” xdebug.show_exception_trace = On ;开启异常跟踪 xdebug.collect_vars = On ;收集变量 xdebug.collect_return = On ;收集返回值 xdebug.collect_params = On ;收集参数 注意：remote_host应该填写远程调试机的地址，而不是PHP服务器的地址，在Xdebug运行方式下，调试工具实际是调试过程的服务端，Xdebug会主动连接指定的remoete_host，从而建立调试通讯。所以要注意调试机的防火墙问题 3.配置调试工具，Eclipse就很好用，具体不说了，摸索下就可以了 4.Apaceh2下的CGI、FastCGI、Module方式都可以正常使用Xdebug 2009-07-07 5.最新发现在PHP5.3+Apache（CGI）方式下，似乎必须使用 [...]]]></description>
			<content:encoded><![CDATA[<p>XDebug是个好东西啊，用来调试PHP程序的，可以和Eclipse配合。</p>
<p>配置步骤：（Windows+Apache+php环境）</p>
<p>1.下载和PHP版本环境相适应的XDebug版本，放置于PHP目录，主要None-ThreadSafe版似乎是用来在CLI方式下使用的，一般不需要</p>
<p>2.修改php.ini文件，参考如下</p>
<pre lang="ini">[Xdebug]
;zend_extension_ts	= "D:\server\php5\ext\php_xdebug-2.0.5-5.3-vc6.dll"
;发现在PHP5.3+Apache（CGI）方式下，似乎必须使用 zend_extension 加载才能成功
zend_extension		= "D:\server\php5\ext\php_xdebug-2.0.5-5.3-vc6-nts.dll"

xdebug.auto_trace		= off		;开启自动跟踪

xdebug.remote_autostart		= off		;开启远程调试自动启动
xdebug.remote_enable		= 1
xdebug.remote_host		= 10.5.184.251
xdebug.remote_port		= 9000
;xdebug.remote_handler		= “dbgp”

xdebug.show_exception_trace	= On		;开启异常跟踪

xdebug.collect_vars		= On		;收集变量
xdebug.collect_return		= On		;收集返回值
xdebug.collect_params		= On		;收集参数
</pre>
<p>注意：remote_host应该填写远程调试机的地址，而不是PHP服务器的地址，在Xdebug运行方式下，调试工具实际是调试过程的服务端，Xdebug会主动连接指定的remoete_host，从而建立调试通讯。所以要注意调试机的防火墙问题</p>
<p><br class="spacer_" /></p>
<p>3.配置调试工具，Eclipse就很好用，具体不说了，摸索下就可以了</p>
<p><span id="more-296"></span><br class="spacer_" /></p>
<p>4.Apaceh2下的CGI、FastCGI、Module方式都可以正常使用Xdebug</p>
<p>2009-07-07</p>
<p>5.最新发现在PHP5.3+Apache（CGI）方式下，似乎必须使用 zend_extension 加载才能成功，而不是Zend_extension_ts</p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p>顺便放个我常用的PHP.ini的设定，你不需要逐个在PHP.INI里查找相应的行，再修改，只有把这些内容附加到PHP.INI文件后面，它会自动覆盖前面设置。</p>
<pre lang="ini">
cgi.force_redirect		= 0
cgi.fix_pathinfo		= 1
fastcgi.impersonate		= 1; 

;session.save_handler		= files
;session.save_path		= /tmp
session.use_cookies		= 1
;session.use_only_cookies	= 1

; file_uploads			= On
; upload_tmp_dir		=
; upload_max_filesize		= 2M
; post_max_size			= 8M
; memory_limit			= 8M

; max_execution_time		= 30
; max_input_time		= 60

display_errors			= on
; error_reporting		=  E_ALL
log_errors			= off
; error_log			= d:\server\php5\logs\error.log

; mysql.connect_timeout		= 1
; doc_root			= d:\wwwroot

extension_dir	= "D:\server\php5\ext"

extension	= php_mysql.dll
extension	= php_mysqli.dll

;extension	= php_pdo.dll
extension	= php_pdo_mysql.dll

extension	= php_mbstring.dll
extension	= php_mcrypt.dll
extension	= php_gd2.dll
extension	= php_bz2.dll
extension	= php_curl.dll
</pre>
]]></content:encoded>
			<wfw:commentRss>http://lee.kometo.com/archives/296/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
