Variables values

How can i see the variable values while program is running


Answer this question

Variables values

  • Laurence Hunter

    Set a breakpoint in your code, or put them inside a setter method so when they change you can set their value on a control somewhere.



  • GitzJoey

    Take a look at http://msdn2.microsoft.com/en-us/library/0taedcee.aspx which contains more details on using the watch windows.

    Hope this helps!

    Thanks,
    Ayman Shoukry
    VC++ Team


  • PedroVasconcelos

    I cant add nothing to watch window. It is blocked. May be because the breakpoints have an exclamation point while i am debugguing...

  • aant10

    I'm not following how this pertains to the problem at hand. However, where are the old projects from How did you open then



  • KindSword

    There's probably a drop down that says debug or release. Otherwise, it's in the Build menu.

    But, even if you build a debug version, until your breakpoint hits, you won't be able to use the watch window.



  • Yael

    wow, i've tried to compile old projects and i've got this error: "MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup"

  • SlowBowler

    cool, i've solved the error problem and in this project the breakpoints worked well and i can use the watch window.

    i just dont understand why it dont work in the other project

    thank you cgraus!

  • PugRallye

  • Sébastien Ros

    can you be more specific
    im starting at vc++ and can't understand your sugestion.

    thank you


  • ghamm

    my old projects. i've created "Project from existing code".

  • samnospam

    "the breakpoint will not currently be hit. No symbols have been loaded for this document." may this be the cause

  • carroll.vance

    You also need to be building a debug version.



  • mcl7cdm

    how
  • Kevon

    The *only* way to watch a variable while your code is running is to write code to report it to you. Watch windows only work when you've hit a break point ( press F9 and the current line of code will have a breakpoint, and execution will stop when you get to that line, allowing you to use the watch window )



  • Variables values