如何在应用程序调试时编辑变量 [英] how to edit the variable when the application is debugging

查看:156
本文介绍了如何在应用程序调试时编辑变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个我调试过的应用程序。当应用程序正在调试时,我想要更改变量。这是否可以更改?



示例



i有代码



int a,b,c;

a = 10 * 2;

b = a + 10;

console.write(b);



i想要改变 b当应用程序正在调试时,要



我试过但是那段时间不可编辑。即显示此信息



目前无法在编辑器中修改此文本。它是只读的。



请帮助我

解决方案

1)设置一个断点 a = 10 * 2;

2)开始调试。

3)程序将停在断点。现在您应该能够更改所需的内容。

请注意,某些更改将阻止程序进一步运行。 Visual Stuido会告诉你何时发生这种情况。

4)继续调试。更改的代码应该可以工作。


当vs在断点处停止时选择变量然后单击它并更改值

你也可以立即使用窗口更改变量值

I have one application that i debugged. When the application is debugging i want change the variable. Is this possible to change?

example

i have the code

int a,b,c;
a=10*2;
b=a+10;
console.write(b);

i want to change b to c when the application is debugging

I tried but that time that is not editable. That is showing this information

Cannot currently modify this text in the editor. It is read-only.

Please help me

解决方案

1) Set a breakpoint on a=10*2;.
2) Start debugging.
3) The program will stop at the breakpoint. Now you should be able to change what's needed.
Note that some changes will prevent the program from running further. Visual Stuido will tell you when that happens.
4) Continue to debug. The changed code should work.


When vs stop at break point select the variable then click on it and change the value


you can also use immediate window to change the variable values


这篇关于如何在应用程序调试时编辑变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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