Visual Studio Watch窗口变灰了吗? [英] Visual Studio Watch window greyed out?

查看:187
本文介绍了Visual Studio Watch窗口变灰了吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个VB应用程序,运行时需要对其进行监视.我向监视"窗口添加了一些变量,但是在应用程序运行时,监视窗口显示为灰色.我发现看到变量值的唯一方法是使用Debug-> Break All,但这会停止程序.

I have a VB app that I need to monitor while it is running. I added some variables to the Watch window, but while the app is running the watch window is greyed out. The only way that I have found to see the variable values is to use Debug -> Break All, but this stops the program.

我使用了其他IDE,它们允许监视活动变量.在VS中有可能吗?

I have used other IDEs and they allow active variables to be monitored. Is this possible in VS?

抱歉,这是一个菜鸟问题.

Sorry if this is a noob question.

更新:为清楚起见,我的应用程序正在与一台实验室设备进行通信,并且当发送或接收数据或检测到错误时,计数器会增加.我想看这些计数器,但是由于它们是用于调试的,因此我不想构建一个屏幕来执行此操作.我只是假设这是任何IDE中的基本功能

UPDATE: To be clear, my app is communicating with a piece of lab equipment and and as data is sent or received or errors are detected counters are incremented. I would like to watch these counters but I don't want to build a screen to do this since they are for debugging. I just assumed that this is basic functionality in any IDE

SHOCKED:似乎Visual Studio不提供此(我认为)基本功能.对于那些似乎认为使用解释语言不可能做到的人,请考虑一下这种思想实验.如果您快速按下Break All(全部中断),然后按Continue(继续),则将刷新监视窗口-对吗?为什么Visual Studio不能将其作为单个刷新监视"命令执行,或者更好的做法是允许该功能在用户指定的时间段内自动运行.没有调试写入,没有日志文件,没有停止程序的中途运行和创建超时.您无法执行此操作令我感到震惊.有点像没有断点.

SHOCKED: It seems that Visual Studio does not offer this (what I would consider) basic functionality. For those that seem to think that this is not possible with an interpreted language, consider this thought experiment. If you pressed Break All quickly followed by a Continue then you would refresh the watch window - correct? Why then can't Visual Studio do this as a single Refresh Watch command or better yet allow this function to automatically run at a period specified by the user. No debug writes, no log files, no stopping your program mid-stream and creating timeouts. I am just shocked that you cannot do this. Its a little like not having breakpoints.

推荐答案

在应用程序运行时,哪个IDE或开发环境可以在监视"窗口中实时显示变量的值,而无需达到任何断点?

Which IDE or development environment shows - in real time - the values of variables in the Watch window, without having to hit any breakpoints, while the application is running?

Visual Studio不提供此功能.为了在监视"窗口中获取更新的值或在其中编辑项目,该应用必须处于断点或调试状态.

Visual Studio doesn't provide this. In order to get updated values in the Watch window, or edit items there, the app needs to be at a breakpoint or debugging.

这篇关于Visual Studio Watch窗口变灰了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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