Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Watch window greyed out?

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.

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.

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: 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.

like image 277
NormD Avatar asked Jul 10 '09 16:07

NormD


People also ask

How do I enable a watch window in Visual Studio?

Observe a single variable or expression with QuickWatch Start debugging. Execution pauses at the breakpoint. Select the variable a in the code. Select Debug > QuickWatch, press Shift+F9, or right-click and select QuickWatch.


1 Answers

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 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.

like image 156
marcc Avatar answered Oct 23 '22 19:10

marcc