简体   繁体   English

如何在IE11 Dev Tools中找到并调试特定文件?

[英]How can I locate and debug a specific file in IE11 Dev Tools?

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. 该站点需要在兼容模式下在IE中运行。

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. 当我从VS(2013)运行该站点时,右键单击解决方案下面的“ http:// localhost / ...”项并选择“在浏览器中查看(Internet Explorer”,然后点击F12,我在调试器上看到)选中已设置为默认页面的文件(登录后我看到的“主”页面),但从那里我看不到如何打开另一个文件 - 我需要调试的文件。

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. 我假设您要在dist中的某处调试JavaScript文件。 Just go to that file and write debugger; 只需转到该文件并编写debugger; inside the function you want to debug. 在您要调试的函数内部。 The open dev tools in IE and reload the page. IE中的开放式开发工具并重新加载页面。 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. 启动一个应该使用调试器调用该函数的操作(如果它没有在页面加载时完成),您将能够调试它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将JavaScript中的数组导出到IE11上的CSV或Excel文件中? - How can I export my Arrays in JavaScript into a CSV or Excel file on IE11? 如何从本地驱动器上的 .js 文件中获取 JavaScript 代码并在 IE11 中运行它? - How can I grab JavaScript code from a .js file on local drive and run it in IE11? 调试崩溃的IE11 - Debug a crashing IE11 如何在Visual Studio或IE11中调试严重的JavaScript错误(语法/ SCRIPT1002)? - How do I debug critical JavaScript errors (syntax/SCRIPT1002) in Visual Studio or IE11? 我收到一个 Failed to mount component: template or render function not defined in IE11 but not defined in other browsers. 如何定位故障点? - I'm getting a Failed to mount component: template or render function not defined in IE11 but not other browsers. How to locate point of failure? 安装IE11后如何在IE8上进行测试? - How can I test on IE8 after installing IE11? 在IE11中下载文件 - Download file in IE11 我可以从IE11中的Web Worker访问MSCrypto吗? - Can I access MSCrypto from a Web Worker in IE11? 我无法让.addClass在IE11中工作 - I can't get .addClass to work in IE11 如何在IE11上单击文件时触发保存目标? - How can I trigger save target as when click files on IE11?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM