如何在asp.net中调试JavaScript? [英] How to debug javascript in asp.net?

查看:209
本文介绍了如何在asp.net中调试JavaScript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早安,
请让我知道如何对javascript进行调试.
问候,
Rajashekar.

Hi GoodMorning,
please let me know how to degugg the javascript.
Regards,
Rajashekar.

推荐答案

1-如果是IE,请在浏览器中启用脚本调试

在Internet Explorer中,从工具"菜单中选择"Internet选项".
在"Internet选项"对话框中,单击高级"选项卡.
在高级"选项卡上的浏览"下,清除禁用脚本调试".
单击确定.


从要开始调试的js代码中编写
1- Enable the script debugging in the browser in case of IE

In Internet Explorer, choose Internet Options from the Tools menu.
In the Internet Options dialog box, click the Advanced tab.
On the Advanced tab, under Browsing, clear Disable Script Debugging.
Click OK.


write
debugger;

.一旦控件从那里到达调试器行,您就可以像服务器端代码一样开始调试.

请注意:完成后,请从您的js代码中删除debugger 语句

in the js code from where you want to start debugging. Once your controls hits the debugger line from there you can start your debugging similar as your server side code.

Please Note: Remove the debugger statement from your js code once you are done


这篇关于如何在asp.net中调试JavaScript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆