Alex Rivera | Logout

Visual Studio Watch window greyed out?

Asked 2009-07-10T16:16:10.373
10

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.

Edit
Report

2 Answers

2

What you're attempting to do is not possible in Visual Studio. All of the variable inspection windows (watch, locals, autos, etc ...) rely on the debugee process being in a break state in order to function.

This is true of essentially any debugger I've worked with in the past. At least those which use a compiled language.

I'm curious as to what IDE's you're referring to? Did they deal with interpreted languages?

answered 2009-07-10T16:57:52.117
0

Make sure you are in "Debug" build and Microsoft Debugger is running as a service and not blocked/disabled.

answered 2009-07-10T16:25:57.767

Your Answer