All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
ASP.NET,中的上传控件使用_[Asp.Net教程]
SQL Server 2000中的触发器使用分析_[SQL Server教程]
VS,2008,中文版,(90天评估)_[Asp.Net教程]
php session 设置问题_[PHP教程]
在.NET中嵌入和使用资源文件_[Asp.Net教程]
如何在十天内学会php之第八天_[PHP教程]
动态网页PHP程序员的优化调试技术和技巧_php资料_编程技术
.NET数据库应用程序中存储过程的应用_[Asp.Net教程]
C#网络应用编程基础练习题与答案(一)_[Asp.Net教程]
用C#和ADO.NET建立一个数据绑定网格_[Asp.Net教程]
Reading number is top 10 pictures
Catch prostitution woman in China
徐若瑄展示美丽胸围3
男人帮杂志里的惹火性感美女2
The goddess of the single reason1
2012 national geographic daily picture6
2013中国四川省高考作文
The money of more than 100 countries and regions8
Absolutely shocked. National geographic 50 animal photographys7
这酸爽,让人不敢相信
Female star bikini
Download software ranking
The Bermuda triangle3
Professional killers2 data package
Boxer's Top ten classic battle3
Unix video tutorial18
网络管理员第三版
Boxer's Top ten classic battle8
matrix3
asp.net技术内幕
SQL2000 For 4IN1
Boxer's Top ten classic battle9
归海一刀 published in(发表于) 2014/1/30 1:10:53 Edit(编辑)
新瓶旧酒ASP.NET,AJAX(3),-,客户端脚本编程(调试和跟踪)_[Asp.Net教程]

新瓶旧酒ASP.NET,AJAX(3),-,客户端脚本编程(调试和跟踪)_[Asp.Net教程]

新瓶旧酒ASP.NET AJAX(3) - 客户端脚本编程(调试和跟踪)_[Asp.Net教程]

新瓶旧酒ASP.NET AJAX(3) - 客户端脚本编程(调试和跟踪)



介绍
ASP.NET AJAX既包含有服务端代码,又包含有客户端代码。然而对客户端代码的调试不同于对服务端代码的调试,下面我们就来看一下如何对客户端代码进行调试。



关键
1、配置IE
工具 - Internet选项 - 高级,设置“禁用脚本调试(Internet Explorer)”和“禁用脚本调试(其他)”为未选中状态,设置“显示每个脚本错误的通知”为选中状态。(参考:在Visual Studio中调试JavaScript)


2、Tracing信息显示在ID为“TraceConsole”的textarea中。



示例
DebuggingAndTracing.aspx
<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="DebuggingAndTracing.aspx.cs"
Inherits="ClientScripting_DebuggingAndTracing" Title="调试和跟踪" %>






onclick="return btnAssert_onclick()" />



onclick="return btnFail_onclick()" />



onclick="return btnTrace_onclick()" />



onclick="return btnDump_onclick()" />



onclick="return btnClear_onclick()" />








运行结果
1、单击“Assert测试”按钮,则弹出确认框
第一个确认框
Assertion Failed: a的当前值为:50,而我们需要它大于60
Break into debugger?
第二个确认框
Assertion Failed: a的当前值为:50,而我们需要它大于60
at function btnAssert_onclick()
{
var a = 50;

Sys.Debug.assert(a > 60, "a的当前值为:“" + a + "”,而我们需要它大于60");
Sys.Debug.assert(a > 60, "a的当前值为:“" + a + "”,而我们需要它大于60", true);
}
Break into debugger?


2、单击“Fail测试”按钮
弹出“Visual Studio实时调试器”


3、单击“Trace测试”按钮
a的当前值为:“50”,而我们需要它大于60


4、单击“TraceDump测试”按钮
traceDump {INPUT - btnDump}
Name {INPUT - btnDump}


5、单击“ClearTrace测试”按钮
清空ID为“TraceConsole”的textarea

作者:webabcd

[源码下载]







添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.