在Visual Studio中调试时可以编辑代码,如eclipse(java) [英] is it possible to edit code while debugging in visual studio, like in eclipse (java)

查看:118
本文介绍了在Visual Studio中调试时可以编辑代码,如eclipse(java)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio中的断点调试时是否有编辑代码的选项。当我停止,所有文件似乎被锁定进行编辑。

Is there an option to edit the code when debugging in a breakpoint in Visual Studio. When I stop, all files seems locked for editing.

有没有办法改变这种行为?尝试以下所有建议(包括将其从发行版移动到其调试版本)中,可能在Eclipse中

Is there a way to change this behaviour? It is possible in Eclipse

编辑:现在告诉我,我没有正确的 ms-office 版本,调试无法以调试模式启动。但是,在发布模式下,它正在工作。我试图调试outlook加载项。

after trying all suggested below (including move it to debug from release) now it is telling me I don't have the correct ms-office version and debug cannot start in debug mode. However, in release mode it was working. I am trying to debug an outlook add-in.

推荐答案

是的,它被称为编辑并继续,在工具| 调试下的选项。请注意,它与 IntelliTrace ,所以你必须禁用,如果你使用它。 (感谢您 Anton Semenov 获取该信息。)

Yes, it's called "Edit and Continue", in Tools | Options under Debugging. Note that it's not compatible with IntelliTrace, so you have to disable that if you're using it. (Thank you Anton Semenov for that info.)

编辑:如果您使用的是一个非常旧的版本(原来的VS.Net,而不是VS.Net 2005或更高版本),那么这个(或没有,我不记得了,我只记得被挫败)。但是如果您使用的是VS.Net 2005或更高版本,根据我的经验,默认情况下会启用该功能。当执行暂停时(你说你打破了一个断点,所以...),你可以做出相当多的变化,环境将乐意编译并继续。确保您要调试的所有项目都在解决方案中。

Edit: If you're using a really old version (the original VS.Net, as opposed to VS.Net 2005 or later), it was pretty fiddly about this (or didn't have it, I can't quite recall; I just remember being frustrated). But if you're using VS.Net 2005 or later, in my experience, it's enabled by default and works very well. When execution is paused (and you said you'd hit a breakpoint, so...), you can make quite a variety of changes and the environment will happily compile them and continue. Make sure all of the projects you want to debug are in the solution.

这篇关于在Visual Studio中调试时可以编辑代码,如eclipse(java)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆