wpf 在哪里可以找到“启用非托管代码的调试”以在系统运行时编辑代码?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/36989182/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 13:47:13  来源:igfitidea点击:

Where to find "Enable Debugging of Unmanaged Code" to be able to edit the code while the system is running?

c#c++wpfvisual-studio-2013visual-studio-2015

提问by Khalil Khalaf

In an older version of Visual Studio (Like the one at home, guess 2013), I am able to edit my code while the system is running but I can't continue (and I don't want to continue). While step-pingthrough my code, I just want to start typing and once I finish editing then to recompile.

在旧版本的 Visual Studio 中(就像家里的那个,猜测是 2013 年),我可以在系统运行时编辑我的代码,但我无法继续(而且我不想继续)。在逐步执行我的代码时,我只想开始打字,一旦我完成编辑然后重新编译。

The advantage is that while typing I can hoover my mouse and watch values/structures of the variables and edit according. It's a nice guide sometimes, like a reminder or notes.

优点是在打字时,我可以悬停鼠标并观察变量的值/结构并进行编辑。有时这是一个很好的指南,比如提醒或笔记。

Why my Visual Studio 2015 prevents me from editing my code? saying:

为什么我的 Visual Studio 2015 阻止我编辑代码?说:

Changes are not allowed when unmanaged debugging is enabled

启用非托管调试时不允许更改

P.Smy Edit and Continueoption is enabled as suggested everywhere on the internet. And there is no Enable Unmanaged debugging optionfor 2015 like suggested here for 2010 How to: Enable Debugging of Unmanaged Code

PS我的“编辑并继续”选项已按照互联网上的建议启用。并且没有像此处建议的 2015 年启用非托管调试选项,如 2010 年如何:启用非托管代码的调试

Edit: It's a C#/C++ application. I didn't start the project from scratch and it's a huge one. I start it as Debugger and sometimes Release. Doesn't work on both (I don't care about the Release)

编辑:这是一个 C#/C++ 应用程序。我没有从头开始这个项目,这是一个巨大的项目。我以 Debugger 启动它,有时以 Release 启动它。对两者都不起作用(我不在乎发行版)

How my settings under Tools -> Options -> Debugging -> Generallook like:

我的设置Tools -> Options -> Debugging -> General如下:

enter image description hereenter image description here

在此处输入图片说明在此处输入图片说明

回答by SLaks

You're in the completely wrong place; that's the system-wide debug options.

你在完全错误的地方;那是系统范围的调试选项。

As explained in the post you linked to, you need to go to the Debug tab in Project Properties.

正如您链接到的帖子中所述,您需要转到“项目属性”中的“调试”选项卡。

回答by Josh

use native compatibility mode when you want to break ok C++ code. Also right click on the project and check "enable native debugging" in the project properties. Those two things should allow you to debug c++ (not edit and continue, just normal debugging)

当您想破坏 ok C++ 代码时,请使用本机兼容模式。同时右键单击项目并在项目属性中选中“启用本机调试”。这两件事应该允许您调试 C++(不是编辑和继续,只是正常调试)