Is the Visual Studio Watch window grayed out?

I have a VB application that I need to monitor while it is running. I added some variables to the Watch window, but while the application is running, the View window is grayed out. The only way I have found to see the values ​​of the variables is to use Debug -> Break All, but that stops the program.

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

Sorry if this is a noob question.

UPDATE. To be clear, my application is communicating with a piece of lab equipment, and when data is sent or received or errors are detected, the counters are incremented. I would like to see these counters, but I do not want to create a screen for this as they are for debugging purposes. I just assumed this is basic functionality in any IDE

SHOCKED: It looks like Visual Studio doesn't offer this (what I believe) basic functionality. For those who seem to think this is not possible with interpreted language, consider this thought experiment. If you click "Break All" and then "Continue", you refresh the viewport - right? Why then can't Visual Studio do it as a single Refresh Watch command, or better yet, allow this feature to automatically start at a user defined period. No debugging, no log files, does not stop the middle of the program, and creates timeouts. I'm just shocked that you cannot do this. It's a bit like the lack of breakpoints.

+10


source to share


5 answers


What IDE or development environment shows - in real time - the values ​​of the variables in the viewport without hitting any breakpoints while the application is running?



Visual Studio does not provide this. To get updated values ​​in the viewport or edit elements there, the application must be at a breakpoint or debug point.

+5


source


After you have "break" to give control to the debugger, you can step through the code using function keys such as F10 and F11. During each step, the program evaluates one or more operators; after each step it stops (until the next step), and as long as it stops (just for now), you can "observe" its current state.

There are other ways to hack the debugger (use the Clock window while the program is stopped): other ways to set breakpoints and use the run at cursor function.


Sure, but stopping a program that is actively receiving or transmitting data to some other process, driver, etc. stops this message and causes timeouts and other problems.



It's true. To watch the values ​​change in real time, I use the log file:

  • Adding statements to my code such that when the value of the variable changes, I allocate a new line to the log file (showing the changed value)

  • Run the program

  • Watch for new lines being added to the log file with a utility like tail -f

    .

I've never seen a debugger with the mentioned functionality. The closest thing to the functionality you mentioned (and which doesn't really apply to your functionality) How to set a data breakpoint (native only) .

+5


source


What you are trying to do is not possible in Visual Studio. All variable-checked windows (clock, locals, auto, etc.) Rely on a bursting debut process to function.

This goes for pretty much every debugger I've worked with in the past. At least those using a compiled language.

I am curious which IDE are you referring to? Did they deal with interpreted languages?

+2


source


Make sure you are in the Debug assembly and Microsoft Debugger is running as a service and not locked / disabled.

0


source


0


source







All Articles