gpt4 book ai didi

visual-studio - 禁止在调试时编辑代码

转载 作者:行者123 更新时间:2023-12-04 05:32:54 29 4
gpt4 key购买 nike

最近,当我调试我的应用程序时,当应用程序未处于损坏状态时,我已经能够将代码写入 C# 文件。我已经尝试在 Visual Studio 选项中完全禁用“编辑并继续”设置,但这似乎不起作用。

我期望发生的是,当我调试并输入 C# 文件时,我希望弹出一个显示“应用程序运行时不允许更改”的弹出窗口,提示我在代码中放置一个断点以应用更改在应用程序处于暂停状态的运行时。我不确定这是否是 2019 年最新版本中引入的更改,或者我的选项是否有问题。关于这个的任何想法都会很棒。

作为引用,这是我想要的弹出窗口:

enter image description here

这些是我的设置:

enter image description here

以及我不想要的功能的证明

enter image description here

最佳答案

根据 VS 团队的说法,这是按设计工作的:

This behavior you described is expected for Visual Studio 16.3. We went through several changes on Edit and Continue and now allow editing the code while the application is running. Any errors or warnings regarding your changes will show up at the Error List Window. In order to apply these changes, you simply have to be on a break state (e.g. break all or stop on a breakpoint) and continue from there.



来源: https://developercommunity.visualstudio.com/content/problem/768979/able-to-type-while-debugging.html

关于visual-studio - 禁止在调试时编辑代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58299640/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com