Additional words:
1) to Debug javascript like C++ in Visual studio, enable some options in your browser firstly,
(detailed steps refer to below text);
2) attach your browser to VS;
3) Open javascript source code in your visual studio, and you can set some breakpoints as you like
4) use your browser to open some HTML files with javascript source code, you will find
you can debug it just like you debug visual c++ application.
BTW, I tried in Visual studio 2008, it does work. And actually I have found IE already has
a very good debugger, so the tip maybe is garbage ...
2011/01/13
=============================================================================================
http://blog.csdn.net/bluedestiny/archive/2006/05/15/739893.aspx
用vs2003来调试脚本(图)
客户端脚本中常常出现的一些问题和调试技巧 < language="javascript" type="text/javascript">document.title="客户端脚本中常常出现的一些问题和调试技巧 - "+document.title
来举例说明吧:
1、打开IE高级选项。把“禁止调试脚本去掉”。最好把“显示每个脚本错误的通知”选上。
2、把调试窗口的时程附加进vs2003的进程中。打开vs2003-》工具-》调试进程-》选中要调试的窗口。点击附加,选择调试类型为(script),再点击确定。
3、现在即可在vs2003里调试你的脚本程序了。如:你可以设置断点来调试。方法就是按F9设置断点,如图
用IDE环境来调试脚本就比alert或者msgbox(stop)来得方便,但也是按自己的喜欢。