文章分类 | 推荐文章 | 最新文章 | 热点文章 | 最新软件 | 国产软件 | 国外软件 | 汉化补丁 | 设为首页 | 加入收藏
业界资讯 | 图形图像 | 操作系统 | 网络冲浪 | 工具软件 | 办公软件 | 媒体动画 | 精文荟萃 | 认证考试 | 网站建设 | 技术开发 | 专栏
当前位置:abcdown网络学院网络编程ASPDebugging ASP - Part 1: Debugging by Insertion
精品广告
推荐TOP10
·如何解密加密的ASP源代码
·PHP+MySQL 购物车程序实例
·ASP网站漏洞及入侵防范方法
·ASP网络安全
·1小时ASP入门
·初学ASP动态网页制作常用错误处理
·ASP实现网页打开任何类型文件都保存
·ASP技巧:使用FSO自动创建多级文件夹的函数
·轻松建站 主流ASP内容管理系统
·ASP教程:透彻掌握ASP分页技术
阅读TOP10
·WEB打印设置解决方案二(利用ScriptX.cab控件改变IE打印设置)
·无组件上传图片到数据库中,最完整解决方案
·从网页上下载控件时制作CAB包的方法
·用ASP程序实现二级下拉列表
·URL重写可删节日期模式---正则表达式之强力应用
·automation服务器不能创建对象
·asp中可以保存参数值的分页代码
·二级域名原理以及程序 申请即可开通
·GridView控件自定义分页详解
·WEB打印设置解决方案四(在ASP中实现网络打印功能)

Debugging ASP - Part 1: Debugging by Insertion

日期:2004年10月10日 作者:清风网络学院 查看:[大字体 中字体 小字体]


By Tom Parkhurst

The debugging process can be painful for both novice and seasoned
developers alike. The next three newsletters will cover the basics of
debugging ASP code. While I can't promise that the methods I'll
describe will ease the pain, they will get you through the effort with
far less bruises.

Debugging can be boiled down to one simple phrase: Got a bug, find the
bug, fix the bug. Defined as any unplanned and/or unexpected result,
a "bug" can take the form of a blatant VB Script error popping up in
the browser window or something subtler, like the transposition of two
database fields?contents. Any time the implementation does not match
the design, considered it a bug.

Not to say that all bugs are necessarily bad things. When encountering
a bug that prevents the implementation from matching the design, ask
yourself: "Do I really want to fix it?". The oft abused phrase, "It's
not a bug, it's a feature!", should sometimes be taken seriously. If
what you actually built seems good, then perhaps you should
advocate "for" it rather than "fix" it. I have done this often with
good results.

When a bug really must be fixed, two possible scenarios generally
unfold:

1. You know your code so well that you immediately know what to fix
and where to fix it. Usually, a VB script error identifies the
problem and its location. Wouldn抰 it be a beautiful world if
all debugging were that easy?

2. In the more common debugging scenario, you don't have a clue.
The rest of this discussion will address this case.

Sound code design is the key to successful debugging. Modular code,
which separates functionality into small subprocedures and functions,
shortens the debugging cycle considerably. Functions and subroutines
present distinct pieces of code that can be tested and verified
separately.

One standard debugging technique temporarily inserts a Response.Write

[1] [2] 下一页 

上一篇:一切为了超频!PConline网友自制水冷系统

下一篇:ASP 3.0高级编程(十六)


相关软件: 相关文章:
·使用ASP.NET2.0的ReportViewer查看RDLC报表
·打造一个通用ASP.NET数据分页控件
·asp.net结合html,javascript实现无刷新跨域数据提交
·Asp.Net中使用水晶报表
·Asp.net Ajax 中的脚本错误: Sys未定义 的解决方法
·ASP.NET2.0下含有DropDownList的GridView编辑、删除的完整例子!
·500M永久免费ASP虚拟主机

特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
[打印本页] [关闭窗口] 转载请注明来源:http://www.abcdown.net
首页 | 本站声明 | 下载帮助 | 发布软件 |
中文版权所有:ABC学院 浙ICP备05000717号