如何在IE11 Dev Tools中找到并调试特定文件? [英] How can I locate and debug a specific file in IE11 Dev Tools?

查看:623
本文介绍了如何在IE11 Dev Tools中找到并调试特定文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文件属于遗留网站的一部分我正在维护我需要调试 - 进入,等等。但我看不出怎么做。该站点需要在兼容模式下在IE中运行。



当我通过右键单击



...但不是我需要的。如果我在搜索框中输入其名称,我会发现,找不到结果。这是在页面文件夹下面,但显示的那些。是什么让它们与众不同?为什么可以我选择那些不受欢迎的人,但是不能选择我唯一关心的页面?

解决方案

我假设你有你想要的JavaScript文件在dist的某处调试。只需转到该文件并在要调试的函数内写入 debugger; 。 IE中的开放式开发工具并重新加载页面。启动应该使用调试器调用该函数的操作(如果在页面加载时没有完成),您将能够调试它。


I have a file that is part of a legacy web site I'm maintaining that I need to debug - step into, etc. But I can't see how to do that. The site needs to be run in IE, in Compatibility mode.

When I run the site from VS (2013) by right-clicking the "http://localhost/..." item beneath the solution and selecting "View in Browser (Internet Explorer" and then hit F12, I see on the Debugger tab the file that has been set as the Default page (the "main" page I see after logging in), but from there I don't see how to open a different file - the one I need to debug.

There are a handful of files apparently available for selection beneath the folder icon:

...but not the one I need. If I enter its name in the search box, I get, "No results found." It is beneath a pages folder, but so are those that are displayed. What makes them special? Why can I select those undesirables, but cannot select the only page I care about?

解决方案

I assume you have the JavaScript file you want to debug somewhere in dist. Just go to that file and write debugger; inside the function you want to debug. The open dev tools in IE and reload the page. Initiate an action that should invoke that function with debugger (if it was not done on page load) and you will be able to debug it.

这篇关于如何在IE11 Dev Tools中找到并调试特定文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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