angular - 通过 Visual Studio Community 2017 在 Firefox 中调试 Angular 7 应用程序

标签 angular debugging firefox visual-studio-2017 angular7

我一直在寻找在 Firefox 中设置 VS Code 调试器的说明,以便我可以调试 TypeScript 代码的断点。

不幸的是,谷歌的第一页只返回给我有关 Visual Studio Code 的说明,但我正在寻找有关 Visual Studio Community 2017 的说明?

我还在以下位置偶然发现了一个插件:

https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-firefox-debug

但我对插件描述感到困惑,因为它向我指出了一个 VSCode 文件,而我的 Visual Studio Community 2017 中似乎不存在该文件:

To configure these modes you must create a file .vscode/launch.json in the root directory of your project.

这是否意味着我需要使用项目中的 launchSettings.json ?如果是这样,配置会是什么样子?

我确信我错了,但是我该如何放置它?

{
  "iisSettings": {
    ...
  },
  "profiles": {
    ...
    "Debug with Firefox" : { // ????? How do i set up this Profile?
      "name": "Launch index.html",
      "type": "firefox",
      "request": "launch",
      "reAttach": true,
      "file": "${workspaceFolder}/index.html"
   }
  }
}

任何有关这方面的知识将不胜感激!

亲切的问候

最佳答案

Does that mean i need to use launchSettings.json from my project? And if so, how will the configuration look like?

不,此扩展适用于 Visual Studio Code,而不是 Visual Studio。因此您无法将其用于 Visual Studio。

Debugger for Firefox :

A Visual Studio Code extension to debug your web application or browser extension in Firefox.

此外,旧的 Visual Studio 调试器允许调试在浏览器中运行的后端 .NET 代码和客户端 JavaScript,但在旧的 VS 版本中仅支持 IE 浏览器,例如 >VS2015.

您可以从 Visual Studio 2017 内部在 Chrome 中调试 Angular 7 应用程序,Visual Studio 团队在 Google Chrome 浏览器中提供集成 JavaScript 调试,但适用于 Firefox 支持,我们必须在用户声音上打开一个新线程:

Provide integrated JavaScript debugging in Firefox and Google Chrome browsers

当有足够多的社区对此反馈进行投票并添加评论时,产品团队成员将会认真对待该反馈。

此时,您可以使用 Google Chrome 来调试 Angular 7 应用程序。

希望这有帮助。

关于angular - 通过 Visual Studio Community 2017 在 Firefox 中调试 Angular 7 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53460218/

相关文章:

javascript - 通过 Javascript 更新 DOM 导致内存泄漏(仅在 Firefox 中?)

angular - @angular/cdk/collections DataSource<T> 的断开连接方法未被调用

angular - 为什么我看不到 ngOnChanges 记录在我的应用程序中

erlang - 跟踪 Erlang 函数 - 简写形式

node.js - 使用 VS Code + Mocha 进行调试并在 'read-only inlined content from source map' 文件处停止断点

c++ - 这个C++方法可以简化吗?

javascript - [] vs [{...}] 在浏览器工具中,同时具有相同的对象

javascript - 为什么已经创建的元素会继承新元素的样式(在 Angular 中的 ngFor 上)?

firefox - 从 Firefox 扩展设置 HTTP header

css - Firefox 和 Chrome/IE 之间的显示差异