在Visual Studio 2005中进行Javascript的调试

1.       Ctrl+S 健保存页面设计

2.       打开浏览器窗口

3.       单击浏览器中的【工具】——【Internet选项】——【高级】 ,打开选项卡,找到复选框“禁用脚本调式(Internet Explorer)“和”禁用脚本调试(其他)“,并 取消对其的选择。

4.       在要查看的变量前添加一句代码“debugger;“ ,比如:

var total;
for(var i=0; i<6: i++)
{
    
debugger;
    total 
= total + i ;
}

5.       F5健运行程序,光标停在debugger处,按F10逐步调试程序。

posted on 2009-08-04 11:11  哪热  阅读(356)  评论(1编辑  收藏  举报

导航