javascript 如何在asp.net 中调试javascript?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11982564/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to debug the javascript in asp.net?
提问by Jui Test
I want to know ,how to debug javascript in asp.net?Can I apply break point to javascipt?
我想知道,如何在asp.net 中调试javascript?我可以将断点应用到javascipt 吗?
回答by yogi
You could do following
你可以做以下
- Use
debugger
keyword with .Net IDE. In your javascript on your page. something like this. - Use F12 Developer tool with IE browser.
- Use FireBugwith Firefox.
- Use Control - Shift - J to open Developer Tools and bring focus to the Console. for Google Chrome.
debugger
在 .Net IDE 中使用关键字。在您页面上的 javascript 中。像这样的东西。- 在 IE 浏览器中使用 F12 开发者工具。
- 将FireBug与 Firefox 一起使用。
- 使用 Control - Shift - J 打开开发人员工具并将焦点移至控制台。适用于谷歌浏览器。
回答by ssilas777
If you are using Visual Studio along with Internet explorer, you can debug javascript by simply applying breakpoints. Or else if you want to debug your javascript file in fire fox or chrome browsers you can make use of tools like Firebug@ http://getfirebug.com/
如果您将 Visual Studio 与 Internet Explorer 一起使用,则可以通过简单地应用断点来调试 javascript。或者,如果您想在 fire fox 或 chrome 浏览器中调试 javascript 文件,您可以使用Firebug等工具@ http://getfirebug.com/
回答by Stack User
You can use Firefox
but Firebug
should be installed. Then, from Script
tab, you should "Reload" to see all resources. After that, when you want to debug any line, put breakpoint
to left side of code and when you reload the page debug will start and you can step into/ over / out, continue, rerun..
你可以使用Firefox
但Firebug
应该安装。然后,从Script
选项卡中,您应该“重新加载”以查看所有资源。之后,当你想调试任何一行时,放在breakpoint
代码的左侧,当你重新加载页面时,调试将开始,你可以进入/结束/退出,继续,重新运行..
回答by vidur punj
You can use Firebug tool in Mozilla browser it will notify all the error in your javascript, what java scripts are loaded, function call to javascripts are correct or not on run time.
您可以在 Mozilla 浏览器中使用 Firebug 工具,它会通知您的 javascript 中的所有错误、加载了哪些 java 脚本、对 javascript 的函数调用在运行时是否正确。
回答by Mateusz Rogulski
You can use firefox firebug or chrome tool.
您可以使用 firefox firebug 或 chrome 工具。
for example:
例如:
you click in chrome examine the element
and then in "Source" you select your script add breakpoints and debug it.
您单击 chrome examine the element
,然后在“源”中选择您的脚本添加断点并调试它。