我一直在寻找在 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。
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/