IE中调试javascript的方法

本文介绍如何在Internet Explorer中启用和使用脚本调试功能。XP SP2之后,脚本调试选项被分为针对Internet Explorer和其他应用程序两部分。介绍了三种脚本调试工具:Visual Studio .Net、Microsoft Script Debugger和Microsoft Script Editor。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

原文链接:http://blogs.msdn.com/b/ie/archive/2004/10/26/247912.aspx
I thought I’d take a couple minutes to talk about Script Debugging and Internet Explorer.

Script debugging is turned off by default you can enable it by going to:
Tools->Internet Options…->Advanced->Disable Script Debugging

Prior to XPSP2 the above will turn script debugging on for all applications that host the WebBrowser control (Outlook for example).

On XPSP2 we’ve split the option into two:
Tools->Internet Options…->Advanced->Disable Script Debugging (Internet Explorer)
Tools->Internet Options…->Advanced->Disable Script Debugging (Other)

When you’ve enabled Script Debugging ‘View->Script Debugger’ will now be present to help you break into the debugger.

The debugger statement can also be placed anywhere in your code to suspend execution this is similar to setting a breakpoint.
The Stop statement is the VBScript version of JScript’s debugger statement.

There are three applications which I’ve used for script debugging.  One is Visual Studio.Net, the second is Microsoft Script Debugger and the third is Microsoft Script Editor:

Miscrosoft Script Debugger:
You can obtain a copy of the Microsoft Script Debugger here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=2f465be0-94fd-4569-b3c4-dffdf19ccd99&displaylang=en

The main MSDN page for using the Microsoft Script Debugger can be found here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdbug/Html/sdbug_1.asp

The Microsoft Script debugger allows you to debug client side and server side scripts and provides the same functionality as most debuggers do.

Directions on using the Microsoft Script debugger can be found here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdbug/Html/sdbug_2.asp

Microsoft Script Editor:
The Microsoft Script Editor comes free with Microsoft Office XP/2003 with FrontPage.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfp2k2/html/odc_fpdebugscripts.asp
 
Visual Studio.net:
For Visual Studio.net debugging Monica Rosculet has written an excellent article on: Debugging Script Code Using Visual Studio.

Other:
Gregg Miskelly a developer on the Visual Studio team has posted some excellent information about: How Script Debugging Works.

-Phil Nachreiner

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值