visual-studio - Visual Studio 2019:关闭浏览器窗口时停止调试器,但在调试停止时不关闭浏览器
问题描述
如果我关闭运行 Web 应用程序的浏览器,调试会话最好终止。毕竟,这等于关闭了一个windows应用程序。但是,如果我停止调试并且浏览器有多个选项卡(通常是这种情况),所有选项卡都会关闭——这绝对不是我想要的。不使用此选项意味着我不断忘记调试器正在运行并且单击停止按钮只是额外的工作。
是否有 Visual Studio 的附加组件或任何其他仅允许执行第一个操作的技巧:关闭窗口时停止调试器?
谁认为在一个复选框后面放置两个选项是个好主意?这是一把最锋利的双刃剑!
解决方案
It's not exactly what you want. But, it might be a workaround. If you enable JavaScript debugging in Tools->Options->Debugging and then you Debug->Detach All. The browser should stay open and debugging should stop... Now it would mean that the application is still running, which might not be desirable.
It's a great suggestion to make this an option. I'd encourage you to open a suggestion on developer community.
Tools Options:
Detach:
推荐阅读
- java - 如何修复休息获取,文件下载有时显示文件未找到错误
- pytorch - 不稳定的 GPU-Util Pytorch 突然下降
- laravel - 查看 layouts.clientLayout.client_header] 未找到
- java - 将逗号分隔的文本文件读入 HashMap,其中文件在多行 Java 中具有相同的键
- android - OneSignal - 使用来自 url 的自定义图像从 android 应用程序发送通知
- python - 使用 pandas 打印为 csv 时从字符串数组中删除括号
- angular - Angular 7 CustomValidator 永远无效
- azure - Cosmos DB OFFSET LIMIT 子句未按预期工作
- apache-kafka - Kafka 中的许多小队列 - 如何保持横向扩展负载平衡?
- java - @SpringBootTest 导致“未找到给定包含的测试”