Watch in Visual C++ .NET
How do you watch a variable''s value in Visual C++ .NET? In Borland Turbo C++ 3.0, there is this nice little tool called Watch and it''s very easy to use. And then, when you compile your program, a nice little debugger window appears, and it tracks any changes in the variable you are watching. How do you do this in VC++.NET?
My compiler generates one error message: "Doesn''t compile."
-Albert Tedja-
Debug->Windows->Watch
The menu item will only be visible while you are running the debugger. Another option is to select Debug->QuickWatch while you are at a breakpoint and add a variable to the watch window.
The menu item will only be visible while you are running the debugger. Another option is to select Debug->QuickWatch while you are at a breakpoint and add a variable to the watch window.
I did what you said. I run the program in the debug mode, and I successfully open the watch window, but how do i put my variables there?
My compiler generates one error message: "Doesn''t compile."
-Albert Tedja-
My compiler generates one error message: "Doesn''t compile."
-Albert Tedja-
Too bad it doesn't work. It gives me the cross mark icon. btw, I have found the way to add it. I select the variable and right click on it, and there's an option to "Add Watch" and it successfully added to the watch window.
But then I have another problem, although the value of that variable is recorded when I add it, but I don't see any changes with the value (in the watch window) during the runtime where the variable is supposed to change.
[edit]
Never mind, problem solved. I have to break the program execution to see the changes.
[/edit]
My compiler generates one error message: "Doesn't compile."
-Albert Tedja-
[edited by - nicho_tedja on July 16, 2002 3:39:53 AM]
But then I have another problem, although the value of that variable is recorded when I add it, but I don't see any changes with the value (in the watch window) during the runtime where the variable is supposed to change.
[edit]
Never mind, problem solved. I have to break the program execution to see the changes.
[/edit]
My compiler generates one error message: "Doesn't compile."
-Albert Tedja-
[edited by - nicho_tedja on July 16, 2002 3:39:53 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement