如何在Firebug的外部JS脚本中设置断点 [英] How can I set breakpoints in an external JS script in Firebug
问题描述
@Jason:这是一个好点,但在我的情况下,我不可以轻松访问脚本。我特别在谈论ASP.Net验证器调用的客户端脚本,我想调试。我可以通过输入函数调用在调试会话期间访问它们,但是我找不到直接访问它们的方法。
查看和访问Firebug内的外部JavaScript文件(* .js):
- 点击脚本选项卡。 >
- 点击
脚本代码内容窗口上方
左上角的全部下拉菜单。 - 选择'显示静态脚本。
- 点击下拉式按钮,只需
现在说static
的权限(默认情况下,它应该显示名称
您当前的网页)。您现在可以看到
与当前网页
相关联的文件列表
,包括任何外部JS文件。 - 选择您的$文件
感兴趣,它的代码将
显示在内容窗口中。从
那里,你应该可以设置正常的
断点。
I can easily set breakpoints in embedded JS functions, but I don't see any way of accessing external JS scripts via Firebug unless I happen to enter them during a debug session. Is there a way to do this without having to 'explore' my way into the script?
@Jason: This is a good point, but in my case I do not have easy access to the script. I am specifically talking about the client scripts which are invoked by the ASP.Net Validators that I would like to debug. I can access them during a debug session through entering the function calls, but I could not find a way to access them directly.
To view and access external JavaScript files (*.js) from within Firebug:
- Click on the 'Script' tab.
- Click on the 'all' drop down in the upper left hand corner above the script code content window.
- Select 'Show Static Scripts'.
- Click on the dropdown button just to the right of what now says 'static' (By default, it should show the name of your current web page). You should now see a list of files associated with the current web page including any external JS files.
- Select the JavaScript file you are interested in and it's code will display in the content window. From there, you should be able to set breakpoints as normal.
这篇关于如何在Firebug的外部JS脚本中设置断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!