在ASP中故意加入了“Stop”以便调试,结果在 VS2005 中“当前语句”的箭头指在了“Stop”语句下面N行处,这明明不对嘛!重装各版本的 Win2003,重装 VS2005,IIS,均无效。
在网上找原因,几乎没有人碰到过这个问题。郁闷,难道没有人在 Win2003 下调试 asp?
无奈,Google 英文“win 2003 asp incorrect line”,找到了一篇文章,“Incorrect line highlighted when debugging server-side with ASP Classic”,正好是我遇到的问题,可惜此文只有问没有答。突然发现另一条结果,是 M$ 官方的,题目为“FIX: In IIS 6.0, Script Debugger breaks on an incorrect line of code when you debug an ASP page that contains double-byte characters”,啊哈,就是它了!点击打开,该死的机器翻译,也许只有机器人才能看懂。调回英文原文,嗯,刚好能够解决我的问题。马上根据文章指引,申请下载它的 hotfix,微软挺讲究,还给加了压缩密码,无聊。从邮箱里找出邮件中描述的密码,密码竟然是“!MQ$pfAZa”,汗一个。复制之,解压之,安装之,重启之,重试之,OK,这回 VS 显示正常了。
终于又对 Win2003 充满信心了。
问题总结:M$ 对此问题产生的原因描述得比较明确:
This problem occurs because the double-byte characters cause the Asp.dll file to return an incorrect offset. The number of double-byte characters that the ASP page contains directly affects the offset that the Asp.dll file returns. For example, if an ASP page contains many double-byte characters, the debug breakpoint occurs on a line of code that is far away from the expected line of code.
难怪遇到此问题老外这么少,原来只有“double-byte characters”才会引发。
M$ 原文(http://support.microsoft.com/kb/928452/en-us)主要内容如下:
FIX: In IIS 6.0, Script Debugger breaks on an incorrect line of code when you debug an ASP page that contains double-byte characters
Hotfix Download Available View and request hotfix downloads |
On This Page
SYMPTOMS
CAUSE
RESOLUTION
Hotfix information
A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.
Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
Prerequisites
You must be running either Windows Server 2003 with Service Pack 2 (SP2) or Windows Server 2003 with Service Pack 1 (SP1) to apply this hotfix.Restart requirement
You do not have to restart the computer after you apply this hotfix.Hotfix replacement information
This hotfix does not replace any other hotfixes.File information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.Windows Server 2003, x86-based versions
File name | File version | File size | Date | Time | Platform | SP requirement | Service branch |
---|---|---|---|---|---|---|---|
Asp.dll | 6.0.3790.2860 | 379,392 | 11-Jan-2007 | 19:10 | x86 | SP1 | SP1QFE |
Asp.dll | 6.0.3790.4004 | 388,096 | 11-Jan-2007 | 20:20 | x86 | SP2 | SP2QFE |
Windows Server 2003, x64-based versions
File name | File version | File size | Date | Time | Platform | SP requirement | Service branch |
---|---|---|---|---|---|---|---|
Asp.dll | 6.0.3790.2860 | 611,840 | 11-Jan-2007 | 22:03 | x64 | SP1 | SP1QFE |
Wasp.dll | 6.0.3790.2860 | 379,392 | 11-Jan-2007 | 22:03 | x86 | SP1 | WOW |
Asp.dll | 6.0.3790.4004 | 621,056 | 12-Jan-2007 | 11:00 | x64 | SP2 | SP2QFE |
Wasp.dll | 6.0.3790.4004 | 388,096 | 12-Jan-2007 | 11:00 | x86 | SP2 | WOW |
Windows Server 2003, Itanium-based versions
File name | File version | File size | Date | Time | Platform | SP requirement | Service branch |
---|---|---|---|---|---|---|---|
Asp.dll | 6.0.3790.2860 | 1,061,376 | 11-Jan-2007 | 22:02 | IA-64 | SP1 | SP1QFE |
Wasp.dll | 6.0.3790.2860 | 379,392 | 11-Jan-2007 | 22:03 | x86 | SP1 | WOW |
Asp.dll | 6.0.3790.4004 | 1,071,104 | 12-Jan-2007 | 11:00 | IA-64 | SP2 | SP2QFE |
Wasp.dll | 6.0.3790.4004 | 388,096 | 12-Jan-2007 | 11:00 | x86 | SP2 | WOW |
STATUS
MORE INFORMATION
Keywords: |
kbautohotfix kbwinserv2003presp2fix kbexpertiseinter kbhotfixserver kbfix kbbug kbqfe kbpubtypekc KB928452 |