Thread: Visual C++ 6/.net Debug static variables

  1. #1
    30 Helens Agree neandrake's Avatar
    Join Date
    Jan 2002

    Visual C++ 6/.net Debug static variables

    I use a static variable in one of my functions, and I am trying to debug the program, but when I step through, the QuickWatch window doesn't show the static variable. So I looked up how to add the variable to the watch by entering its name into the Watch window. All it says is that the symbol is not found. Is there something special you have to do to watch static variables?
    Environment: OS X, GCC / G++
    Codes: Java, C#, C/C++
    AOL IM: neandrake, Email: neandrake (at) gmail (dot) com

  2. #2
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Might have something to do with statics being global but with scope. I don't know anything about that debug enviornment though.
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

  3. #3
    Join Date
    May 2004
    I don't know why it is doing that but have you tried referencing a pointer to it and watching the pointer?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. seg fault at vectornew
    By tytelizgal in forum C Programming
    Replies: 2
    Last Post: 10-25-2008, 01:22 PM
  2. Debug --> Exceptions in Visual Studio 2005
    By George2 in forum C# Programming
    Replies: 1
    Last Post: 08-10-2007, 02:12 AM
  3. Static variables and functions problem in a class
    By earth_angel in forum C++ Programming
    Replies: 16
    Last Post: 09-15-2005, 12:08 PM
  4. Replies: 2
    Last Post: 10-02-2004, 10:12 AM
  5. <list>
    By Unregistered in forum C++ Programming
    Replies: 9
    Last Post: 02-24-2002, 04:07 PM