<?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>守望轩 &#187; debug</title>
	<atom:link href="http://www.watch-life.net/tag/debug/feed" rel="self" type="application/rss+xml" />
	<link>http://www.watch-life.net</link>
	<description>关注IT,审视自我,守望生活, 宁静雅致的小轩馆.</description>
	<lastBuildDate>Tue, 20 Jul 2010 00:46:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>web developer tips (52):部署Asp.net web应用须设置debug为false</title>
		<link>http://www.watch-life.net/visual-studio/deploying-your-asp-net-web-application-debug-false-should-be-set-in-web-config.html</link>
		<comments>http://www.watch-life.net/visual-studio/deploying-your-asp-net-web-application-debug-false-should-be-set-in-web-config.html#comments</comments>
		<pubDate>Sun, 27 Sep 2009 15:20:46 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[web developer tips]]></category>
		<category><![CDATA[调试]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=453</guid>
		<description><![CDATA[原文地址：When deploying your ASP.NET web application, debug=false should be set in web.config
为了解决程序的问题，开发人员通常在web.config 中启动调试(debug)模式，这将导致ASP.NET产生诸如调试符号、元数据等的额外信息。然而，性能上会的花费更长的时间去进行编译和运行，消耗更多的内存，缓存资源无法执行。因此，在发布产品时，应该把调试设置为&#8221;false&#8221;避免对性能的影响。有两个方法可以实现这一目标：
http://www.watch-life.net/visual-studio/deploying-your-asp-net-web-application-debug-false-should-be-set-in-web-config.html
1) 在web.config 文件中，设置“&#60;compilation debug=”false”/&#62;”
2)在 ASP.NET所在的系统的Machine.config 启动“&#60;compilation debug=”false”/&#62;”，设置代码如下：
&#160;&#160;&#160; &#60;system.web&#62; &#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;deployment retail=”true”/&#62; &#160;&#160;&#160; &#60;/system.web&#62; 
这个在machine.config设置关闭网页追踪和详细的远程错误消息，关于这个设置的详细内容参见：
http://msdn.microsoft.com/zh-cn/library/ms228298(VS.80).aspx
machine.config 文件通常位于：
%SystemRoot%\Microsoft.NET\Framework\%VersionNumber%\CONFIG.


	你可能也会喜欢以下文章：
	
	web developer tips (19):设置默认视图为设计视图 (0)
	新年新计划 (3)
	如何不使用让menu控件不回发（postback） (0)
	web developer tips (68):附加样式表到网页 (0)
	web developer tips (44):如何在Visual Studio中查看项目文件 (2)
	web developer tips (27):Microsoft Web Platform (0)
	web developer tips (66):输入属性时自动插入引号 (0)
	web developer tips (30):在vs2008中Ajax [...]]]></description>
			<content:encoded><![CDATA[<p>原文地址：<a href="http://blogs.msdn.com/webdevelopertips/archive/2009/04/14/tip-52-did-you-know-when-deploying-your-asp-net-web-application-debug-false-should-be-set-in-web-config.aspx" target="_blank">When deploying your ASP.NET web application, debug=false should be set in web.config</a></p>
<p>为了解决程序的问题，开发人员通常在web.config 中启动调试(debug)模式，这将导致<a href="http://www.watch-life.net/category/aspnet" target="_blank">ASP.NET</a>产生诸如调试符号、元数据等的额外信息。然而，性能上会的花费更长的时间去进行编译和运行，消耗更多的内存，缓存资源无法执行。因此，在发布产品时，应该把调试设置为&#8221;false&#8221;避免对性能的影响。有两个方法可以实现这一目标：</p>
<p><a href="http://www.watch-life.net/visual-studio/deploying-your-asp-net-web-application-debug-false-should-be-set-in-web-config.html" target="_blank">http://www.watch-life.net/visual-studio/deploying-your-asp-net-web-application-debug-false-should-be-set-in-web-config.html</a></p>
<p>1) 在web.config 文件中，设置“&lt;compilation debug=”false”/&gt;”</p>
<p>2)在 ASP.NET所在的系统的Machine.config 启动“&lt;compilation debug=”false”/&gt;”，设置代码如下：<br />
<P>&nbsp;&nbsp;&nbsp; &lt;system.web&gt; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;deployment retail=”true”/&gt; <BR>&nbsp;&nbsp;&nbsp; &lt;/system.web&gt; </P></p>
<p>这个在machine.config设置关闭网页追踪和详细的远程错误消息，关于这个设置的详细内容参见：<br />
<a href="http://msdn.microsoft.com/zh-cn/library/ms228298(VS.80).aspx" target="_blank">http://msdn.microsoft.com/zh-cn/library/ms228298(VS.80).aspx</a></p>
<p>machine.config 文件通常位于：<br />
<strong>%SystemRoot%\Microsoft.NET\Framework\%VersionNumber%\CONFIG.</strong></p>
<p class="akst_link">
</p>
	<h4>你可能也会喜欢以下文章：</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.watch-life.net/visual-studio/set-the-default-view-to-design-view.html" title="web developer tips (19):设置默认视图为设计视图 (2009-07-08)">web developer tips (19):设置默认视图为设计视图</a> (0)</li>
	<li><a href="http://www.watch-life.net/life-thinking/new-year-new-plan.html" title="新年新计划 (2008-02-09)">新年新计划</a> (3)</li>
	<li><a href="http://www.watch-life.net/aspnet/control-menu-no-postback.html" title="如何不使用让menu控件不回发（postback） (2007-11-08)">如何不使用让menu控件不回发（postback）</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/how-simple-it-is-to-attach-an-existing-style-sheet-to-your-web-page.html" title="web developer tips (68):附加样式表到网页 (2009-11-26)">web developer tips (68):附加样式表到网页</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/view-the-project-file-while-still-in-visual-studio.html" title="web developer tips (44):如何在Visual Studio中查看项目文件 (2009-09-08)">web developer tips (44):如何在Visual Studio中查看项目文件</a> (2)</li>
	<li><a href="http://www.watch-life.net/visual-studio/microsoft-web-platform.html" title="web developer tips (27):Microsoft Web Platform (2009-07-20)">web developer tips (27):Microsoft Web Platform</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/insert-quotes-values-automatically-while-typing-the-attrib-values.html" title="web developer tips (66):输入属性时自动插入引号 (2009-11-19)">web developer tips (66):输入属性时自动插入引号</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/ajax-extender-controls-ui-behaves-differently-in-vs-2008-than-in-vs-2005.html" title="web developer tips (30):在vs2008中Ajax Extender 控件UI与vs2005中差异 (2009-07-27)">web developer tips (30):在vs2008中Ajax Extender 控件UI与vs2005中差异</a> (0)</li>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：0 | <b><a href='http://www.watch-life.net/visual-studio/deploying-your-asp-net-web-application-debug-false-should-be-set-in-web-config.html#comment'>评论这篇文章</a></b>|关注作者最近动态,欢迎 follow me <a href='https://twitter.com/xjb' target='_blank'>xjb@twitter.com</a>|联络作者：iamxjb@gmail.com<br/>© 2010 守望轩 <a href='http://www.watch-life.net/visual-studio/deploying-your-asp-net-web-application-debug-false-should-be-set-in-web-config.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/deploying-your-asp-net-web-application-debug-false-should-be-set-in-web-config.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>web developer tips (51):使用vs2005和IE8进行调试</title>
		<link>http://www.watch-life.net/visual-studio/use-vs2005-to-debug-with-ie8.html</link>
		<comments>http://www.watch-life.net/visual-studio/use-vs2005-to-debug-with-ie8.html#comments</comments>
		<pubDate>Thu, 24 Sep 2009 16:01:42 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[vs2005]]></category>
		<category><![CDATA[web developer tips]]></category>
		<category><![CDATA[调试]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=452</guid>
		<description><![CDATA[原文地址： how to use VS2005 to debug with IE8
由于IE8默认设置下的散偶合功能，导致vs2005不能通过IE8进行调试。如果想启动调试（debug），请按如下步骤操作：
1、打开注册表编辑器
2、打开键 HKEY_LOCALMACHINE -> SOFTWARE -> Microsoft -> Internet Explorer -> Main
3、增加一个名为“ TabProcGrowth ”的dword 值
4、设置“ TabProcGrowth ”的值为0
同时，在调试的时候，不要忘记启动脚本调试功能（IE菜单：工具+选项+高级，不选中“禁用脚本功能(Internet Explorer)”）。
另：不能调试也可能是IE增强安全配置导致的，参见：脚本远程调试需关闭IE增强安全配置


	你可能也会喜欢以下文章：
	
	web developer tips (84):在Visual Web Developer中设置web网站的起始页 (0)
	中文版Visual Studio 2008  SP1 智能提示为英文的补丁发布 (3)
	web developer tips (33)：在vs2008里创建套嵌母版页 (1)
	web developer tips (25):在iis7下规范URLs和重定向 (1)
	web developer tips (15):在ASP.NET Ajax里使用跟踪 (0)
	web developer tips (40):定义母版页的作用范围 (0)
	web developer [...]]]></description>
			<content:encoded><![CDATA[<p>原文地址： <a href="http://blogs.msdn.com/webdevelopertips/archive/2009/03/31/tip-51-did-you-know-how-to-use-vs2005-to-debug-with-ie8.aspx" target="_blank">how to use VS2005 to debug with IE8</a></p>
<p>由于IE8默认设置下的<a href="http://blogs.msdn.com/ie/archive/2008/03/11/ie8-and-loosely-coupled-ie-lcie.aspx" target="_blank">散偶合功能</a>，导致vs2005不能通过IE8进行调试。如果想启动调试（debug），请按如下步骤操作：</p>
<p>1、打开注册表编辑器<br />
2、打开键 HKEY_LOCALMACHINE -> SOFTWARE -> Microsoft -> Internet Explorer -> Main<br />
3、增加一个名为“ TabProcGrowth ”的dword 值<br />
4、设置“ TabProcGrowth ”的值为0</p>
<p>同时，在调试的时候，不要忘记启动脚本调试功能（IE菜单：工具+选项+高级，不选中“禁用脚本功能(Internet Explorer)”）。</p>
<p>另：不能调试也可能是IE增强安全配置导致的，参见：<a href="http://www.watch-life.net/visual-studio/turning-off-ie-s-enhanced-security-configuration.html" target="_blank">脚本远程调试需关闭IE增强安全配置</a></p>
<p class="akst_link">
</p>
	<h4>你可能也会喜欢以下文章：</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.watch-life.net/visual-studio/set-a-start-page-for-your-web-site-in-visual-web-developer.html" title="web developer tips (84):在Visual Web Developer中设置web网站的起始页 (2010-03-29)">web developer tips (84):在Visual Web Developer中设置web网站的起始页</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/vs2008-sp1-intellisense.html" title="中文版Visual Studio 2008  SP1 智能提示为英文的补丁发布 (2008-11-28)">中文版Visual Studio 2008  SP1 智能提示为英文的补丁发布</a> (3)</li>
	<li><a href="http://www.watch-life.net/visual-studio/create-nested-master-pages-using-vs-2008.html" title="web developer tips (33)：在vs2008里创建套嵌母版页 (2009-08-11)">web developer tips (33)：在vs2008里创建套嵌母版页</a> (1)</li>
	<li><a href="http://www.watch-life.net/visual-studio/you-can-have-canonical-urls-and-redirects-with-iis-7-0.html" title="web developer tips (25):在iis7下规范URLs和重定向 (2009-07-19)">web developer tips (25):在iis7下规范URLs和重定向</a> (1)</li>
	<li><a href="http://www.watch-life.net/visual-studio/use-tracing-with-asp-net-ajax.html" title="web developer tips (15):在ASP.NET Ajax里使用跟踪 (2009-07-02)">web developer tips (15):在ASP.NET Ajax里使用跟踪</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/know-how-to-scope-master-pages.html" title="web developer tips (40):定义母版页的作用范围 (2009-08-31)">web developer tips (40):定义母版页的作用范围</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/absolute-position-controls-on-copy-paste-or-drag-drop-from-toolbox.html" title="web developer tips (18):从工具箱粘贴或拖拽控件时进行绝对定位 (2009-07-07)">web developer tips (18):从工具箱粘贴或拖拽控件时进行绝对定位</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/web-deployment-migrate-operation.html" title="web developer tips (46):使用Web Deployment Tool进行Web部署迁移 (2009-09-11)">web developer tips (46):使用Web Deployment Tool进行Web部署迁移</a> (0)</li>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：0 | <b><a href='http://www.watch-life.net/visual-studio/use-vs2005-to-debug-with-ie8.html#comment'>评论这篇文章</a></b>|关注作者最近动态,欢迎 follow me <a href='https://twitter.com/xjb' target='_blank'>xjb@twitter.com</a>|联络作者：iamxjb@gmail.com<br/>© 2010 守望轩 <a href='http://www.watch-life.net/visual-studio/use-vs2005-to-debug-with-ie8.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/use-vs2005-to-debug-with-ie8.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>web developer tips (15):在ASP.NET Ajax里使用跟踪</title>
		<link>http://www.watch-life.net/visual-studio/use-tracing-with-asp-net-ajax.html</link>
		<comments>http://www.watch-life.net/visual-studio/use-tracing-with-asp-net-ajax.html#comments</comments>
		<pubDate>Thu, 02 Jul 2009 13:03:23 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[Sys.Debug.trace]]></category>
		<category><![CDATA[web developer tip]]></category>
		<category><![CDATA[调试]]></category>
		<category><![CDATA[跟踪]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=397</guid>
		<description><![CDATA[原文地址： How to use tracing with ASP.NET Ajax
如果你在使用ASP.NET Ajax的时候，遇到一个页面问题，想在调试时候跟踪语句，有个比较快速的方法：使用“Sys.Debug.trace”函数。
&#60;script language=&#34;javascript&#34; type=&#34;text/javascript&#34;&#62;
function PositionDiv() {
Sys.Debug.trace(&#34;Entering PositionDiv Function&#34;);
//some other code
Sys.Debug.trace(&#34;Exiting PositionDiv Function&#34;);
}
&#60;/script&#62;
 http://www.watch-life.net/visual-studio/use-tracing-with-asp-net-ajax.html
为了看到跟踪输出的内容，在页面上加一个TextArea的控件，控件的ID为“TraceConsole”。这个现实的跟踪的可用性，一旦应用，将意味着将该TextArea必须手动添加到输出。不过，在调试网站的时候，跟踪的内容也被写到Visual Studio的输出窗口，就像FireFox的输出控制台一样。
Sys.Debug 类还有其他许多好的方法，例如:
assert:如果被测试的条件是false的，将会有个消息框来显示消息。
fail：引发程序终止或中断调试。
traceDump：用清晰的格式显示对象数据。
延伸阅读：
1、有关Sys.Debug 参见：http://msdn.microsoft.com/zh-cn/library/bb397422.aspx
2、Debugging and Tracing AJAx Applications

　
下面是在不同的方式来debug AJAX-enabled ASP.NET application

(1)在Configuration文件中授权.
(2)在服务端使用tracing
(3)使用在Sys.Debug类的方法设置breakpoints和handle trace输出
(4)在浏览器材里面授权debugging
(5)追加Visual Studio2008 debugger或在你的浏览器里面扩展工具.
(7)使用扩展工具捕获HTTP的交换.

　
(1)在Configuration文件中授权.


在Configuration中添加一个compilation元素,设置一贯debug属性为&#34;true&#34;,如下面:

　

	&#60;configuration&#62;
	&#160;&#160;&#60;system.web&#62;
	&#160;&#160;&#160;&#160;&#60;compilation&#160;debug=&#34;true&#34;&#62;
	&#160;&#160;&#160;&#160;&#160;&#160;&#60;!&#8211;&#160;etc.&#160;&#8211;&#62;
	&#160;&#160;&#160;&#160;&#60;/compilation&#62;
	&#160;&#160;&#60;/system.web&#62;
	&#60;configuration&#62;


要将应用程序发布,就要从debug该为Release才能发布

在Web.config文件中,如果compilation元素中包括debug,就将里面debug属性该为&#34;false&#34;

确定在ScriptManager中面的ScriptMode属性设置为Release

而在@page中指定的debug属性不会影响ASP.NET AJAX applications.而为ScriptManager在Web.config中设置的IsDebuggingEnabled
and ScriptMode属性是决定是否呈现debug脚本.

　
(2)Tracing on the Server


怎样授权ASP.NET页面Tracing就是这样
&#60;%@ Page Trace=&#34;true&#34; %&#62;

而在ASP.NET
AJAX中就必须有一个partial-page呈现授权,也就是要在ScriptManager中将EnablePartialRendering属性设置为&#34;true&#34;,
其实就是所说的饿&#34;view debugger trace messages in the Output window&#34;.&#160;
　
(3)Debug Helper Class

ASP.NET为调试客户端应用程序提供一个Sys.Debug Class.如果你是IE你可以在你的也面上创建一个


就是使用下面的方法:

Sys.Debug.assert(condition,message,displayCaller)
给出检测条件,并如果条件为false时候,就会有在debugger中提示.

Sys.Debug.clearTrace()
清楚所有的指定在id为&#34;TraceConsole&#34;元素中显示的信息.

Sys.Debug.traceDump(object,name)

抑制一个对象在debugger console和TraceConsole中输出.

Sys.Debug.fail(message)
显示一个message在debugger的输出窗口和TraceConsole的textarea元素中

Sys.Debug.trace(text)
在debugger console和TraceConsole中追加一行文本.
这个是MSDN上的事例
　

	&#60;!DOCTYPE&#160;html&#160;PUBLIC&#160;&#34;-//W3C//DTD&#160;XHTML&#160;1.1//EN&#34;&#160;&#34;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&#34;&#62;
	&#60;html&#160;&#62;
	&#60;head&#160;id=&#34;Head1&#34;&#160;runat=&#34;server&#34;&#62;
	&#160;&#160;&#160;&#160;&#60;title&#62;Untitled&#160;Page&#60;/title&#62;
	&#60;script&#160;language=&#34;javascript&#34;&#160;type=&#34;text/javascript&#34;&#62;
	function&#160;btnAssert_onclick()&#160;{
	&#160;&#160;&#160;&#160;var&#160;n;
	&#160;&#160;&#160;&#160;//&#160;Insert&#160;code&#160;intended&#160;to&#160;set&#160;n&#160;to&#160;a&#160;positive&#160;integer.
	&#160;&#160;&#160;&#160;if&#160;(false)&#160;n&#160;=&#160;3;
	&#160;&#160;&#160;&#160;//&#160;Assert&#160;if&#160;n&#160;is&#160;not&#160;greater&#160;than&#160;0.
	&#160;&#160;&#160;&#160;Sys.Debug.assert(n&#160;&#62;&#160;0,&#160;&#34;n&#160;must&#160;be&#160;set&#160;to&#160;a&#160;positive&#160;integer.&#34;);
	}
	
	function&#160;btnFail_onclick()&#160;{
	&#160;&#160;&#160;&#160;var&#160;n;
	&#160;&#160;&#160;&#160;//&#160;Insert&#160;code&#160;intended&#160;to&#160;set&#160;n&#160;to&#160;a&#160;numeric&#160;value.
	&#160;&#160;&#160;&#160;if&#160;(false)&#160;n&#160;=&#160;3;
	&#160;&#160;&#160;&#160;//&#160;Fail&#160;if&#160;n&#160;is&#160;not&#160;numeric.
	&#160;&#160;&#160;&#160;if&#160;(isNaN(n))&#160;Sys.Debug.fail(&#34;The&#160;value&#160;of&#160;n&#160;must&#160;be&#160;a&#160;number.&#34;);
	}
	
	function&#160;btnTrace_onclick()&#160;{
	&#160;&#160;&#160;&#160;v&#160;=&#160;form1.text1.value;
	&#160;&#160;&#160;&#160;Sys.Debug.trace(&#34;Name&#160;set&#160;to&#160;&#34;&#160;+&#160;&#34;\&#34;&#34;&#160;+&#160;v&#160;+&#160;&#34;\&#34;.&#34;);
	&#160;&#160;&#160;&#160;alert(&#34;Hello&#160;&#34;&#160;+&#160;v&#160;+&#160;&#34;.&#34;);
	}
	
	function&#160;btnDump_onclick()&#160;{
	&#160;&#160;&#160;&#160;Sys.Debug.traceDump(form1.text1,&#160;&#34;Name&#160;textbox&#34;);
	&#160;&#160;&#160;&#160;alert(&#34;Hello&#160;&#34;&#160;+&#160;form1.text1.value&#160;+&#160;&#34;.&#34;);
	}
	
	function&#160;btnClear_onclick()&#160;{
	&#160;&#160;&#160;&#160;Sys.Debug.clearTrace()
	&#160;&#160;&#160;&#160;alert(&#34;Trace&#160;console&#160;cleared.&#34;);
	}
	&#60;/script&#62;
	&#60;/head&#62;
	&#60;body&#62;
	&#60;form&#160;id=&#34;form1&#34;&#160;runat=&#34;server&#34;&#62;
	&#160;&#160;&#160;&#160;&#60;h2&#62;Sys.Debug&#160;Methods&#160;Test&#160;Page&#60;/h2&#62;
	&#160;&#160;&#160;&#160;&#60;asp:ScriptManager&#160;ID=&#34;ScriptManager1&#34;&#160;
	&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;runat=&#34;server&#34;&#160;/&#62;
	&#160;&#160;&#160;&#160;&#60;p&#62;&#60;b&#62;Use&#160;these&#160;buttons&#160;to&#160;demonstrate&#160;the&#160;assert()&#160;and&#160;fail()&#160;
	&#160;&#160;&#160;&#160;methods:&#60;/b&#62;&#60;br&#160;/&#62;
	&#160;&#160;&#160;&#160;&#60;input&#160;id=&#34;btnAssert&#34;&#160;type=&#34;button&#34;&#160;value=&#34;Assert&#34;&#160;
	&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;style=&#34;width:&#160;100px&#34;&#160;
	&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;onclick=&#34;return&#160;btnAssert_onclick()&#34;&#160;/&#62;&#160;&#38;nbsp
	&#160;&#160;&#160;&#160;&#60;input&#160;id=&#34;btnFail&#34;&#160;type=&#34;button&#34;&#160;value=&#34;Fail&#34;&#160;
	&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;style=&#34;width:&#160;100px&#34;&#160;onclick=&#34;return&#160;btnFail_onclick()&#34;&#160;/&#62;
	&#160;&#160;&#160;&#160;&#60;/p&#62;&#60;hr&#160;/&#62;
	&#160;&#160;&#160;&#160;&#60;b&#62;Use&#160;the&#160;textbox&#160;and&#160;buttons&#160;below&#160;to&#160;demonstrate&#160;tracing.&#60;/b&#62;
	&#160;&#160;&#160;&#160;&#60;br&#160;/&#62;
	&#160;&#160;&#160;&#160;&#60;p&#62;Enter&#160;your&#160;name&#160;here:&#60;br&#160;/&#62;
	&#160;&#160;&#160;&#160;&#60;input&#160;id=&#34;text1&#34;&#160;maxlength=&#34;50&#34;&#160;type=&#34;text&#34;&#160;/&#62;
	&#160;&#160;&#160;&#160;&#60;br&#160;/&#62;
	&#160;&#160;&#160;&#160;&#60;br&#160;/&#62;
	&#160;&#160;&#160;&#160;&#60;input&#160;id=&#34;btnTrace&#34;&#160;type=&#34;button&#34;&#160;value=&#34;Trace&#34;&#160;
	&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;style=&#34;width:&#160;100px&#34;&#160;onclick=&#34;return&#160;btnTrace_onclick()&#34;&#160;/&#62;&#60;br&#160;/&#62;
	&#160;&#160;&#160;&#160;&#60;input&#160;id=&#34;btnDump&#34;&#160;type=&#34;button&#34;&#160;value=&#34;TraceDump&#34;&#160;
	&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;style=&#34;width:&#160;100px&#34;&#160;onclick=&#34;return&#160;btnDump_onclick()&#34;&#160;/&#62;&#60;br&#160;/&#62;
	&#160;&#160;&#160;&#160;&#60;input&#160;id=&#34;btnClear&#34;&#160;type=&#34;button&#34;&#160;value=&#34;ClearTrace&#34;&#160;
	&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;style=&#34;width:&#160;100px&#34;&#160;onclick=&#34;return&#160;btnClear_onclick()&#34;&#160;/&#62;&#60;br&#160;/&#62;
	&#160;&#160;&#160;&#160;&#60;br&#160;/&#62;&#60;/p&#62;
	&#160;&#160;&#160;&#160;View&#160;output&#160;in&#160;the&#160;TraceConsole&#160;textarea&#160;below.
	&#160;&#160;&#160;&#160;&#60;br&#160;/&#62;
	&#160;&#160;&#160;&#160;&#60;textarea&#160;id=&#8217;TraceConsole&#8217;&#160;rows=&#34;10&#34;&#160;cols=&#34;50&#34;&#160;
	&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;title=&#34;TraceConsole&#34;&#62;&#60;/textarea&#62;
	&#60;/form&#62;
	&#60;/body&#62;
	&#60;/html&#62;
	

　
(4)To enable [...]]]></description>
			<content:encoded><![CDATA[<p>原文地址：<a href="http://blogs.msdn.com/webdevelopertips/archive/2008/10/19/tip-15-did-you-know-how-to-use-tracing-with-asp-net-ajax.aspx" target="_blank"> How to use tracing with ASP.NET Ajax</a></p>
<p>如果你在使用ASP.NET Ajax的时候，遇到一个页面问题，想在调试时候跟踪语句，有个比较快速的方法：使用“<strong>Sys.Debug.trace</strong>”函数。</p>
<blockquote><p>&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt;</p>
<p>function PositionDiv() {<br />
Sys.Debug.trace(&quot;Entering PositionDiv Function&quot;);<br />
//some other code<br />
Sys.Debug.trace(&quot;Exiting PositionDiv Function&quot;);<br />
}<br />
&lt;/script&gt;</p></blockquote>
<p> <a href="http://www.watch-life.net/visual-studio/use-tracing-with-asp-net-ajax.html" target="_blank">http://www.watch-life.net/visual-studio/use-tracing-with-asp-net-ajax.html</a></p>
<p>为了看到<a href="http://www.watch-life.net/visual-studio/use-tracing-with-asp-net-ajax.html" target="_blank">跟踪输出的内容</a>，在页面上加一个TextArea的控件，控件的ID为“TraceConsole”。这个现实的跟踪的可用性，一旦应用，将意味着将该TextArea必须手动添加到输出。不过，在调试网站的时候，跟踪的内容也被写到Visual Studio的输出窗口，就像FireFox的输出控制台一样。</p>
<p>Sys.Debug 类还有其他许多好的方法，例如:<br />
<strong>assert</strong>:如果被测试的条件是false的，将会有个消息框来显示消息。<br />
<strong>fail</strong>：引发程序终止或中断调试。<br />
<strong>traceDump</strong>：用清晰的格式显示对象数据。</p>
<p>延伸阅读：<br />
1、有关Sys.Debug 参见：http://msdn.microsoft.com/zh-cn/library/bb397422.aspx</p>
<p>2、<a href="http://www.cnblogs.com/worksguo/articles/1097453.html" target="_blank">Debugging and Tracing AJAx Applications</a></p>
<blockquote>
<h2 style="padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 20px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">　</h2>
<p>下面是在不同的方式来debug AJAX-enabled ASP.NET application<br style="clear: both; "><br />
<br style="clear: both; "><br />
(1)在Configuration文件中授权.<br style="clear: both; "><br />
(2)在服务端使用tracing<br style="clear: both; "><br />
(3)使用在Sys.Debug类的方法设置breakpoints和handle trace输出<br style="clear: both; "><br />
(4)在浏览器材里面授权debugging<br style="clear: both; "><br />
(5)追加Visual Studio2008 debugger或在你的浏览器里面扩展工具.<br style="clear: both; "><br />
(7)使用扩展工具捕获HTTP的交换.<br style="clear: both; "><br />
<br style="clear: both; "><br />
　<br />
<hr />(1)在Configuration文件中授权.<br />
<hr /><br style="clear: both; "><br />
<br style="clear: both; "><br />
在Configuration中添加一个compilation元素,设置一贯debug属性为&quot;true&quot;,如下面:<br style="clear: both; "><br />
<br style="clear: both; "><br />
　
<div style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); padding-top: 4px; padding-right: 5px; padding-bottom: 4px; padding-left: 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 646px; ">
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" alt="" align="top"><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">configuration</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" alt="" align="top">&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">system.web</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">compilation&nbsp;</span><span style="color: rgb(255, 0, 0); ">debug</span><span style="color: rgb(0, 0, 255); ">=&quot;true&quot;&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0); ">&lt;!&#8211;&nbsp;etc.&nbsp;&#8211;&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" alt="" align="top">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;/</span><span style="color: rgb(128, 0, 0); ">compilation</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" alt="" align="top">&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;/</span><span style="color: rgb(128, 0, 0); ">system.web</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" alt="" align="top"></span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">configuration</span><span style="color: rgb(0, 0, 255); ">&gt;</span></div>
<p><br style="clear: both; "><br />
<br style="clear: both; "><br />
要将应用程序发布,就要从debug该为Release才能发布<br style="clear: both; "><br />
<br style="clear: both; "><br />
在Web.config文件中,如果compilation元素中包括debug,就将里面debug属性该为&quot;false&quot;<br style="clear: both; "><br />
<br style="clear: both; "><br />
确定在ScriptManager中面的ScriptMode属性设置为Release<br style="clear: both; "><br />
<br style="clear: both; "><br />
而在@page中指定的debug属性不会影响ASP.NET AJAX applications.而为ScriptManager在Web.config中设置的IsDebuggingEnabled<br />
and ScriptMode属性是决定是否呈现debug脚本.<br style="clear: both; "><br />
<br style="clear: both; "><br />
　<br />
<hr />(2)Tracing on the Server<br />
<hr /><br style="clear: both; "><br />
<br style="clear: both; "><br />
怎样授权ASP.NET页面Tracing就是这样<br style="clear: both; "><br />
&lt;%@ Page Trace=&quot;true&quot; %&gt;<br style="clear: both; "><br />
<br style="clear: both; "><br />
而在ASP.NET<br />
AJAX中就必须有一个partial-page呈现授权,也就是要在ScriptManager中将EnablePartialRendering属性设置为&quot;true&quot;,<br style="clear: both; "><br />
其实就是所说的饿&quot;view debugger trace messages in the Output window&quot;.<span class="Apple-converted-space">&nbsp;</span><br style="clear: both; "><br />
　<br />
<hr />(3)Debug Helper Class<br />
<hr /><br style="clear: both; "><br />
ASP.NET为调试客户端应用程序提供一个Sys.Debug Class.如果你是IE你可以在你的也面上创建一个<br style="clear: both; "><br />
<br style="clear: both; "><br />
<br style="clear: both; "><br />
就是使用下面的方法:<br style="clear: both; "><br />
<br style="clear: both; "><br />
Sys.Debug.assert(condition,message,displayCaller)<br style="clear: both; "><br />
给出检测条件,并如果条件为false时候,就会有在debugger中提示.<br style="clear: both; "><br />
<br style="clear: both; "><br />
Sys.Debug.clearTrace()<br style="clear: both; "><br />
清楚所有的指定在id为&quot;TraceConsole&quot;元素中显示的信息.<br style="clear: both; "><br />
<br style="clear: both; "><br />
Sys.Debug.traceDump(object,name)<br style="clear: both; "><br />
<br style="clear: both; "><br />
抑制一个对象在debugger console和TraceConsole中输出.<br style="clear: both; "><br />
<br style="clear: both; "><br />
Sys.Debug.fail(message)<br style="clear: both; "><br />
显示一个message在debugger的输出窗口和TraceConsole的textarea元素中<br style="clear: both; "><br />
<br style="clear: both; "><br />
Sys.Debug.trace(text)<br style="clear: both; "><br />
在debugger console和TraceConsole中追加一行文本.<br style="clear: both; "><br />
这个是MSDN上的事例<br style="clear: both; "><br />
　
<div style="border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); padding-top: 4px; padding-right: 5px; padding-bottom: 4px; padding-left: 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 646px; ">
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt=""><span style="color: rgb(0, 0, 255); ">&lt;!</span><span style="color: rgb(255, 0, 255); ">DOCTYPE&nbsp;html&nbsp;PUBLIC&nbsp;&quot;-//W3C//DTD&nbsp;XHTML&nbsp;1.1//EN&quot;&nbsp;&quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt=""></span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">html&nbsp;</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt=""></span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">head&nbsp;</span><span style="color: rgb(255, 0, 0); ">id</span><span style="color: rgb(0, 0, 255); ">=&quot;Head1&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;runat</span><span style="color: rgb(0, 0, 255); ">=&quot;server&quot;&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">title</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); ">Untitled&nbsp;Page</span><span style="color: rgb(0, 0, 255); ">&lt;/</span><span style="color: rgb(128, 0, 0); ">title</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img id="Codehighlighter1_225_1067_Open_Image" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_225_1067_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_225_1067_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_225_1067_Closed_Text').style.display='inline';" align="top" alt=""></span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">script&nbsp;</span><span style="color: rgb(255, 0, 0); ">language</span><span style="color: rgb(0, 0, 255); ">=&quot;javascript&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;type</span><span style="color: rgb(0, 0, 255); ">=&quot;text/javascript&quot;&gt;</span><span id="Codehighlighter1_225_1067_Open_Text"><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img id="Codehighlighter1_255_462_Open_Image" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_255_462_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_255_462_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_255_462_Closed_Text').style.display='inline';" align="top" alt=""></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255); ">function</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); ">&nbsp;btnAssert_onclick()&nbsp;</span><span id="Codehighlighter1_255_462_Open_Text"><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); ">{<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255); ">var</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); ">&nbsp;n;<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0); ">//&nbsp;Insert&nbsp;code&nbsp;intended&nbsp;to&nbsp;set&nbsp;n&nbsp;to&nbsp;a&nbsp;positive&nbsp;integer.<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt=""></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255); ">if</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); ">&nbsp;(</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255); ">false</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); ">)&nbsp;n&nbsp;=&nbsp;3;<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0); ">//&nbsp;Assert&nbsp;if&nbsp;n&nbsp;is&nbsp;not&nbsp;greater&nbsp;than&nbsp;0.<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt=""></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); ">&nbsp;&nbsp;&nbsp;&nbsp;Sys.Debug.assert(n&nbsp;&gt;&nbsp;0,&nbsp;&quot;n&nbsp;must&nbsp;be&nbsp;set&nbsp;to&nbsp;a&nbsp;positive&nbsp;integer.&quot;);<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="">}</span></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt=""><br style="clear: both; "><br />
	<img id="Codehighlighter1_491_687_Open_Image" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_491_687_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_491_687_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_491_687_Closed_Text').style.display='inline';" align="top" alt=""></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255); ">function</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); ">&nbsp;btnFail_onclick()&nbsp;</span><span id="Codehighlighter1_491_687_Open_Text"><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); ">{<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255); ">var</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); ">&nbsp;n;<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0); ">//&nbsp;Insert&nbsp;code&nbsp;intended&nbsp;to&nbsp;set&nbsp;n&nbsp;to&nbsp;a&nbsp;numeric&nbsp;value.<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt=""></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255); ">if</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); ">&nbsp;(</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255); ">false</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); ">)&nbsp;n&nbsp;=&nbsp;3;<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 128, 0); ">//&nbsp;Fail&nbsp;if&nbsp;n&nbsp;is&nbsp;not&nbsp;numeric.<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt=""></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255); ">if</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); ">&nbsp;(isNaN(n))&nbsp;Sys.Debug.fail(&quot;The&nbsp;value&nbsp;of&nbsp;n&nbsp;must&nbsp;be&nbsp;a&nbsp;number.&quot;);<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="">}</span></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt=""><br style="clear: both; "><br />
	<img id="Codehighlighter1_717_836_Open_Image" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_717_836_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_717_836_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_717_836_Closed_Text').style.display='inline';" align="top" alt=""></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255); ">function</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); ">&nbsp;btnTrace_onclick()&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); " id="Codehighlighter1_717_836_Open_Text">{<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;v&nbsp;=&nbsp;form1.text1.value;<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;Sys.Debug.trace(&quot;Name&nbsp;set&nbsp;to&nbsp;&quot;&nbsp;+&nbsp;&quot;\&quot;&quot;&nbsp;+&nbsp;v&nbsp;+&nbsp;&quot;\&quot;.&quot;);<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;alert(&quot;Hello&nbsp;&quot;&nbsp;+&nbsp;v&nbsp;+&nbsp;&quot;.&quot;);<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="">}</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt=""><br style="clear: both; "><br />
	<img id="Codehighlighter1_865_969_Open_Image" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_865_969_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_865_969_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_865_969_Closed_Text').style.display='inline';" align="top" alt=""></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255); ">function</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); ">&nbsp;btnDump_onclick()&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); " id="Codehighlighter1_865_969_Open_Text">{<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;Sys.Debug.traceDump(form1.text1,&nbsp;&quot;Name&nbsp;textbox&quot;);<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;alert(&quot;Hello&nbsp;&quot;&nbsp;+&nbsp;form1.text1.value&nbsp;+&nbsp;&quot;.&quot;);<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="">}</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt=""><br style="clear: both; "><br />
	<img id="Codehighlighter1_999_1066_Open_Image" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" onclick="this.style.display='none'; document.getElementById('Codehighlighter1_999_1066_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_999_1066_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_999_1066_Closed_Text').style.display='inline';" align="top" alt=""></span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 255); ">function</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); ">&nbsp;btnClear_onclick()&nbsp;</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); " id="Codehighlighter1_999_1066_Open_Text">{<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;Sys.Debug.clearTrace()<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;alert(&quot;Trace&nbsp;console&nbsp;cleared.&quot;);<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="">}</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt=""></span></span><span style="color: rgb(0, 0, 255); ">&lt;/</span><span style="color: rgb(128, 0, 0); ">script</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt=""></span><span style="color: rgb(0, 0, 255); ">&lt;/</span><span style="color: rgb(128, 0, 0); ">head</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt=""></span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">body</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt=""></span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">form&nbsp;</span><span style="color: rgb(255, 0, 0); ">id</span><span style="color: rgb(0, 0, 255); ">=&quot;form1&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;runat</span><span style="color: rgb(0, 0, 255); ">=&quot;server&quot;&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">h2</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); ">Sys.Debug&nbsp;Methods&nbsp;Test&nbsp;Page</span><span style="color: rgb(0, 0, 255); ">&lt;/</span><span style="color: rgb(128, 0, 0); ">h2</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">asp:ScriptManager&nbsp;</span><span style="color: rgb(255, 0, 0); ">ID</span><span style="color: rgb(0, 0, 255); ">=&quot;ScriptManager1&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;runat</span><span style="color: rgb(0, 0, 255); ">=&quot;server&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;</span><span style="color: rgb(0, 0, 255); ">/&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">p</span><span style="color: rgb(0, 0, 255); ">&gt;&lt;</span><span style="color: rgb(128, 0, 0); ">b</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); ">Use&nbsp;these&nbsp;buttons&nbsp;to&nbsp;demonstrate&nbsp;the&nbsp;assert()&nbsp;and&nbsp;fail()&nbsp;<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;methods:</span><span style="color: rgb(0, 0, 255); ">&lt;/</span><span style="color: rgb(128, 0, 0); ">b</span><span style="color: rgb(0, 0, 255); ">&gt;&lt;</span><span style="color: rgb(128, 0, 0); ">br&nbsp;</span><span style="color: rgb(0, 0, 255); ">/&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">input&nbsp;</span><span style="color: rgb(255, 0, 0); ">id</span><span style="color: rgb(0, 0, 255); ">=&quot;btnAssert&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;type</span><span style="color: rgb(0, 0, 255); ">=&quot;button&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;value</span><span style="color: rgb(0, 0, 255); ">=&quot;Assert&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;style</span><span style="color: rgb(0, 0, 255); ">=&quot;width:&nbsp;100px&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onclick</span><span style="color: rgb(0, 0, 255); ">=&quot;return&nbsp;btnAssert_onclick()&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;</span><span style="color: rgb(0, 0, 255); ">/&gt;</span><span style="color: rgb(0, 0, 0); ">&nbsp;</span><span style="color: rgb(255, 0, 0); ">&amp;nbsp</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">input&nbsp;</span><span style="color: rgb(255, 0, 0); ">id</span><span style="color: rgb(0, 0, 255); ">=&quot;btnFail&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;type</span><span style="color: rgb(0, 0, 255); ">=&quot;button&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;value</span><span style="color: rgb(0, 0, 255); ">=&quot;Fail&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;style</span><span style="color: rgb(0, 0, 255); ">=&quot;width:&nbsp;100px&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;onclick</span><span style="color: rgb(0, 0, 255); ">=&quot;return&nbsp;btnFail_onclick()&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;</span><span style="color: rgb(0, 0, 255); ">/&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;/</span><span style="color: rgb(128, 0, 0); ">p</span><span style="color: rgb(0, 0, 255); ">&gt;&lt;</span><span style="color: rgb(128, 0, 0); ">hr&nbsp;</span><span style="color: rgb(0, 0, 255); ">/&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">b</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); ">Use&nbsp;the&nbsp;textbox&nbsp;and&nbsp;buttons&nbsp;below&nbsp;to&nbsp;demonstrate&nbsp;tracing.</span><span style="color: rgb(0, 0, 255); ">&lt;/</span><span style="color: rgb(128, 0, 0); ">b</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">br&nbsp;</span><span style="color: rgb(0, 0, 255); ">/&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">p</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); ">Enter&nbsp;your&nbsp;name&nbsp;here:</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">br&nbsp;</span><span style="color: rgb(0, 0, 255); ">/&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">input&nbsp;</span><span style="color: rgb(255, 0, 0); ">id</span><span style="color: rgb(0, 0, 255); ">=&quot;text1&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;maxlength</span><span style="color: rgb(0, 0, 255); ">=&quot;50&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;type</span><span style="color: rgb(0, 0, 255); ">=&quot;text&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;</span><span style="color: rgb(0, 0, 255); ">/&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">br&nbsp;</span><span style="color: rgb(0, 0, 255); ">/&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">br&nbsp;</span><span style="color: rgb(0, 0, 255); ">/&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">input&nbsp;</span><span style="color: rgb(255, 0, 0); ">id</span><span style="color: rgb(0, 0, 255); ">=&quot;btnTrace&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;type</span><span style="color: rgb(0, 0, 255); ">=&quot;button&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;value</span><span style="color: rgb(0, 0, 255); ">=&quot;Trace&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;style</span><span style="color: rgb(0, 0, 255); ">=&quot;width:&nbsp;100px&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;onclick</span><span style="color: rgb(0, 0, 255); ">=&quot;return&nbsp;btnTrace_onclick()&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;</span><span style="color: rgb(0, 0, 255); ">/&gt;&lt;</span><span style="color: rgb(128, 0, 0); ">br&nbsp;</span><span style="color: rgb(0, 0, 255); ">/&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">input&nbsp;</span><span style="color: rgb(255, 0, 0); ">id</span><span style="color: rgb(0, 0, 255); ">=&quot;btnDump&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;type</span><span style="color: rgb(0, 0, 255); ">=&quot;button&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;value</span><span style="color: rgb(0, 0, 255); ">=&quot;TraceDump&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;style</span><span style="color: rgb(0, 0, 255); ">=&quot;width:&nbsp;100px&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;onclick</span><span style="color: rgb(0, 0, 255); ">=&quot;return&nbsp;btnDump_onclick()&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;</span><span style="color: rgb(0, 0, 255); ">/&gt;&lt;</span><span style="color: rgb(128, 0, 0); ">br&nbsp;</span><span style="color: rgb(0, 0, 255); ">/&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">input&nbsp;</span><span style="color: rgb(255, 0, 0); ">id</span><span style="color: rgb(0, 0, 255); ">=&quot;btnClear&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;type</span><span style="color: rgb(0, 0, 255); ">=&quot;button&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;value</span><span style="color: rgb(0, 0, 255); ">=&quot;ClearTrace&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;style</span><span style="color: rgb(0, 0, 255); ">=&quot;width:&nbsp;100px&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;onclick</span><span style="color: rgb(0, 0, 255); ">=&quot;return&nbsp;btnClear_onclick()&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;</span><span style="color: rgb(0, 0, 255); ">/&gt;&lt;</span><span style="color: rgb(128, 0, 0); ">br&nbsp;</span><span style="color: rgb(0, 0, 255); ">/&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">br&nbsp;</span><span style="color: rgb(0, 0, 255); ">/&gt;&lt;/</span><span style="color: rgb(128, 0, 0); ">p</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;View&nbsp;output&nbsp;in&nbsp;the&nbsp;TraceConsole&nbsp;textarea&nbsp;below.<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">br&nbsp;</span><span style="color: rgb(0, 0, 255); ">/&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255); ">&lt;</span><span style="color: rgb(128, 0, 0); ">textarea&nbsp;</span><span style="color: rgb(255, 0, 0); ">id</span><span style="color: rgb(0, 0, 255); ">=&#8217;TraceConsole&#8217;&nbsp;</span><span style="color: rgb(255, 0, 0); ">rows</span><span style="color: rgb(0, 0, 255); ">=&quot;10&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;cols</span><span style="color: rgb(0, 0, 255); ">=&quot;50&quot;</span><span style="color: rgb(255, 0, 0); ">&nbsp;<br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;title</span><span style="color: rgb(0, 0, 255); ">=&quot;TraceConsole&quot;&gt;&lt;/</span><span style="color: rgb(128, 0, 0); ">textarea</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt=""></span><span style="color: rgb(0, 0, 255); ">&lt;/</span><span style="color: rgb(128, 0, 0); ">form</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt=""></span><span style="color: rgb(0, 0, 255); ">&lt;/</span><span style="color: rgb(128, 0, 0); ">body</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt=""></span><span style="color: rgb(0, 0, 255); ">&lt;/</span><span style="color: rgb(128, 0, 0); ">html</span><span style="color: rgb(0, 0, 255); ">&gt;</span><span style="color: rgb(0, 0, 0); "><br style="clear: both; "><br />
	<img src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" align="top" alt=""></span></div>
<p><br style="clear: both; "><br />
　<br />
<hr />(4)To enable debugging in Internet Explorer<br />
<hr /><br style="clear: both; "><br />
就是在IE里面设置Disable Script Debugging.<br style="clear: both; "><br />
Disable Script Debugging (Other)<br style="clear: both; "><br />
Display a notification about every script error<br style="clear: both; "><br />
Show friendly HTTP error messages<span class="Apple-converted-space">&nbsp;</span><br style="clear: both; "><br />
都打开就能调试js.<br style="clear: both; "><br />
<br style="clear: both; "><br />
当然还可以使用我们熟悉的那IE的扩展工具.<br style="clear: both; "><br />
<br style="clear: both; "><br />
Attaching the Visual Studio Debugger to Internet Explorer<br style="clear: both; "><br />
<br style="clear: both; "><br />
你要debug客户端的脚本,你必须追加debugger到IE里面.<br style="clear: both; "><br />
<br style="clear: both; "><br />
在Visual Studio debugger中选中Debug menu,选中Attach to Process,只后会有一个Attach to<br />
Process对话框.选种iexplore.exe.<br style="clear: both; "><br />
<br style="clear: both; "><br />
这样就可以拉.如果你使用IE遭遇脚本错误,并且你按这样的设定,但不在当前就追加到debugger中,浏览器会提示你选择一个debugger.你既能继续不debugging或追加一个debugger直接通过代码.</span></span></p>
</blockquote>
<p class="akst_link">
</p>
	<h4>你可能也会喜欢以下文章：</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.watch-life.net/programming-notes/html-table-2-excel.html" title="html页面表格导出到excel总结 (2008-06-23)">html页面表格导出到excel总结</a> (3)</li>
	<li><a href="http://www.watch-life.net/visual-studio/the-style-application-toolbar-works-in-both-auto-and-manual-modes.html" title="web developer tips (2):样式应用工具栏的工作模式 (2009-05-24)">web developer tips (2):样式应用工具栏的工作模式</a> (0)</li>
	<li><a href="http://www.watch-life.net/aspnet/ergodic-children-controls.html" title="遍历页面上的所有控件 (2007-11-20)">遍历页面上的所有控件</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/have-c-and-vb-net-files-inside-your-app-code-directory.html" title="web developer tips (26):在 App_Code目录下同时放c#和VB.NET文件 (2009-07-19)">web developer tips (26):在 App_Code目录下同时放c#和VB.NET文件</a> (0)</li>
	<li><a href="http://www.watch-life.net/life-thinking/new-year-new-plan.html" title="新年新计划 (2008-02-09)">新年新计划</a> (3)</li>
	<li><a href="http://www.watch-life.net/aspnet/gridview-merger-cell.html" title="在GRIDVIEW中合并单元格 (2007-12-18)">在GRIDVIEW中合并单元格</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/improve-performance-of-page-and-server-control-processing.html" title="web developer tips (22):提高页面和服务器控件加载速度 (2009-07-15)">web developer tips (22):提高页面和服务器控件加载速度</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/enable-debugging-of-your-web-site.html" title="web developer tips (14):启动网站调试 (2009-07-02)">web developer tips (14):启动网站调试</a> (1)</li>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：0 | <b><a href='http://www.watch-life.net/visual-studio/use-tracing-with-asp-net-ajax.html#comment'>评论这篇文章</a></b>|关注作者最近动态,欢迎 follow me <a href='https://twitter.com/xjb' target='_blank'>xjb@twitter.com</a>|联络作者：iamxjb@gmail.com<br/>© 2010 守望轩 <a href='http://www.watch-life.net/visual-studio/use-tracing-with-asp-net-ajax.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/use-tracing-with-asp-net-ajax.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>web developer tips (14):启动网站调试</title>
		<link>http://www.watch-life.net/visual-studio/enable-debugging-of-your-web-site.html</link>
		<comments>http://www.watch-life.net/visual-studio/enable-debugging-of-your-web-site.html#comments</comments>
		<pubDate>Wed, 01 Jul 2009 16:10:27 +0000</pubDate>
		<dc:creator>xjb</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[compilation]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[web developer tips]]></category>
		<category><![CDATA[web.config]]></category>
		<category><![CDATA[调试]]></category>

		<guid isPermaLink="false">http://www.watch-life.net/?p=396</guid>
		<description><![CDATA[原文地址：How to enable debugging of your Web Site
在debug的模式配置下运行一个页面，你必须选择菜单：调试+开始启动 或按下F5.
在默认的情况下，调试是没有启用的。如果你想启动调试网站项目，就需要进行配置。这个设置通过修改web.config文件来实现。
默认情况下，在web.config 的compilation节点 的debug 选项设置值是false。
http://www.watch-life.net/visual-studio/enable-debugging-of-your-web-site.html

&#60;compilation debug=&#34;false&#34; strict=&#34;false&#34; explicit=&#34;true&#34;&#62; &#60;/compilation&#62;

当你第一次按下F5的时候，会出现如下对话框：

如果你单击“确定”，Visual Web Developer将会修改web.config 文件，显示“debug=true”

&#60;compilation debug=&#34;true&#34; strict=&#34;false&#34; explicit=&#34;true&#34;&#62; &#60;/compilation&#62;

注意：网站发布的时候，要把这个debug选项设置为false，可以提高程序运行的性能。
有关compilation节点的配置详情见：compilation 元素（ASP.NET 设置架构）


	你可能也会喜欢以下文章：
	
	web developer tips (11):在Visual Web Developer中用不同的工具窗口打开样式生成器 (0)
	web developer tips (83):通过反射从堆栈里获取调用的方法名称 (0)
	在GRIDVIEW中合并单元格 (0)
	web developer tips (25):在iis7下规范URLs和重定向 (1)
	web developer tips (51):使用vs2005和IE8进行调试 (0)
	防止刷新重复提交数据解决方法的分析 (4)
	&#8220;Visual Studio 2008&#8243;背后的勃勃野心 (0)
	web developer tips (66):输入属性时自动插入引号 (0)


转载请注明作者，出处，以及原始超链接。评论数：1 &#124; 评论这篇文章&#124;关注作者最近动态,欢迎 follow [...]]]></description>
			<content:encoded><![CDATA[<p>原文地址：<a href="http://blogs.msdn.com/webdevelopertips/archive/2008/10/16/tip-14-did-you-know-how-to-enable-debugging-of-your-web-site.aspx" target="_blank">How to enable debugging of your Web Site</a></p>
<p>在debug的模式配置下运行一个页面，你必须选择菜单：<strong>调试+开始启</strong>动 或按下<strong>F5</strong>.</p>
<p>在默认的情况下，调试是没有启用的。如果你想<a href="http://www.watch-life.net/visual-studio/enable-debugging-of-your-web-site.html" target="_blank">启动调试网站项目</a>，就需要进行配置。这个设置通过修改web.config文件来实现。<br />
默认情况下，在web.config 的compilation节点 的debug 选项设置值是false。</p>
<p><a href="http://www.watch-life.net/visual-studio/enable-debugging-of-your-web-site.html" target="_blank">http://www.watch-life.net/visual-studio/enable-debugging-of-your-web-site.html</a></p>
<blockquote>
<p>&lt;compilation debug=&quot;false&quot; strict=&quot;false&quot; explicit=&quot;true&quot;&gt; &lt;/compilation&gt;</p>
</blockquote>
<p>当你第一次按下F5的时候，会出现如下对话框：</p>
<p><img title="EnablingDebugging" height="288" alt="EnablingDebugging" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip14DidyouknowHowtoenabledebuggingofyou_BD35/EnablingDebugging_thumb.jpg" width="520" /></p>
<p>如果你单击“确定”，Visual Web Developer将会修改web.config 文件，显示“debug=true”</p>
<blockquote>
<p>&lt;compilation debug=&quot;true&quot; strict=&quot;false&quot; explicit=&quot;true&quot;&gt; &lt;/compilation&gt;
</p></blockquote>
<p>注意：网站发布的时候，要把这个debug选项设置为false，可以提高程序运行的性能。</p>
<p>有关compilation节点的配置详情见：<a href="http://msdn.microsoft.com/zh-cn/library/s10awwz0(VS.80).aspx" target="_blank">compilation 元素</a>（<a href="http://www.watch-life.net/category/aspnet" target="_blank">ASP.NET</a> 设置架构）</p>
<p class="akst_link">
</p>
	<h4>你可能也会喜欢以下文章：</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.watch-life.net/visual-studio/new-style-builder-can-be-invoked-from-various-other-tool-windows-in-visual-web-developer.html" title="web developer tips (11):在Visual Web Developer中用不同的工具窗口打开样式生成器 (2009-06-25)">web developer tips (11):在Visual Web Developer中用不同的工具窗口打开样式生成器</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/you-can-get-the-name-of-the-calling-method-from-the-stack-using-reflection.html" title="web developer tips (83):通过反射从堆栈里获取调用的方法名称 (2010-03-29)">web developer tips (83):通过反射从堆栈里获取调用的方法名称</a> (0)</li>
	<li><a href="http://www.watch-life.net/aspnet/gridview-merger-cell.html" title="在GRIDVIEW中合并单元格 (2007-12-18)">在GRIDVIEW中合并单元格</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/you-can-have-canonical-urls-and-redirects-with-iis-7-0.html" title="web developer tips (25):在iis7下规范URLs和重定向 (2009-07-19)">web developer tips (25):在iis7下规范URLs和重定向</a> (1)</li>
	<li><a href="http://www.watch-life.net/visual-studio/use-vs2005-to-debug-with-ie8.html" title="web developer tips (51):使用vs2005和IE8进行调试 (2009-09-25)">web developer tips (51):使用vs2005和IE8进行调试</a> (0)</li>
	<li><a href="http://www.watch-life.net/aspnet/refresh-no-resubmit.html" title="防止刷新重复提交数据解决方法的分析 (2008-07-12)">防止刷新重复提交数据解决方法的分析</a> (4)</li>
	<li><a href="http://www.watch-life.net/it-review/visual-studio-2008-ambition.html" title="&#8220;Visual Studio 2008&#8243;背后的勃勃野心 (2008-02-10)">&#8220;Visual Studio 2008&#8243;背后的勃勃野心</a> (0)</li>
	<li><a href="http://www.watch-life.net/visual-studio/insert-quotes-values-automatically-while-typing-the-attrib-values.html" title="web developer tips (66):输入属性时自动插入引号 (2009-11-19)">web developer tips (66):输入属性时自动插入引号</a> (0)</li>
</ul>

转载请注明作者，出处，以及原始超链接。<br />评论数：1 | <b><a href='http://www.watch-life.net/visual-studio/enable-debugging-of-your-web-site.html#comment'>评论这篇文章</a></b>|关注作者最近动态,欢迎 follow me <a href='https://twitter.com/xjb' target='_blank'>xjb@twitter.com</a>|联络作者：iamxjb@gmail.com<br/>© 2010 守望轩 <a href='http://www.watch-life.net/visual-studio/enable-debugging-of-your-web-site.html'>www.watch-life.net</a>]]></content:encoded>
			<wfw:commentRss>http://www.watch-life.net/visual-studio/enable-debugging-of-your-web-site.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
