在调试模式下编辑的代码在Visual Studio 2008 [英] Editing code in Visual Studio 2008 in debug mode

查看:200
本文介绍了在调试模式下编辑的代码在Visual Studio 2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很想知道是否有在C#VS 2008编辑代码通行权当它遇到断点,我走直通代码...我可以修改代码(如一个变量的值或者,如果我stepthrough线即将袭击if语句...我可以修改if语句....等)?
到目前为止,我不得不停止运行VS,修改代码,然后按F5键,等到断点再次袭来。

I am curious to know if there is a way to edit code in C# VS 2008 right when it has hit a breakpoint and I am walking thru the code... can I modify the code (such as the value in a variable or if my stepthrough line is about to hit an if statement ... can I modify the if statement....etc)? So far, I have to stop running VS, modify the code, then hit F5 and wait till the breakpoint is hit again.

在断点命中,而我走直通的代码,我尝试编辑代码,我得到一个消息时,调试器已附加到正在调试在构建进行优化或运行时的代码已在运行过程中的变化是不允许的。

When the breakpoint hits, and I am walking thru the code, and I attempt to edit the code, I get a message "Changes are not allowed when the debugger has been attached to an already running process of the code being debugged was optimized at build or run time."

推荐答案

有只有我自己知道,为什么编辑+将继续在调试版本被禁用的几个原因。首先是64位操作系统,E + C仅适用于32位代码。修复了与项目+属性,生成标签,平台目标= 86。

There are only a few reasons I know of why Edit+Continue would be disabled in the Debug build. First and foremost is a 64-bit operating system, E+C only works for 32-bit code. Fix that with Project + Properties, Build tab, Platform Target = x86.

也可能已经关闭的选项。工具+选项,调试,编辑并继续,启用复选框。

It is also an option that might have been turned off. Tools + Options, Debugging, Edit and Continue, Enable checkbox.

如果这没有帮助,告诉我们一些关于你正在调试样的代码,当你开始这个项目,你是怎么调试器,打破和调用堆栈窗口复制一个堆栈跟踪您所选择的项目模板。

If this doesn't help, tell us a bit more about the kind of code you're debugging, the project template you selected when you started the project, how you got the debugger to break and a stack trace copied from the Call Stack window.

这篇关于在调试模式下编辑的代码在Visual Studio 2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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