Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

nicho_tedja

Watch in Visual C++ .NET

This topic is 5916 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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-

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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-

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!