watch window in the debug is empty - c++

I was trying to understand how to fix my watch window but didn't find any good answer(I'm using visual studio 2013).
I used the debugger and suddenly the watch window didn't show the values or the object i'm have in the block - actually it didn't show anything anymore.
Does anyone know how can it be fixed?
Many thanks!!!

Maby this will help you:
To open the QuickWatch dialog box with a variable added While in break
mode, right-click a variable name in the source window name and choose
QuickWatch. This automatically places the variable into the QuickWatch
dialog box.
Source

The Watch windows don't show anything by default, you need to add things to them to see the values. What might have happened in your case, is that either you deleted what you had by mistake, or you ran into a bug, where something got corrupted in your solution and they were lost.
If you want to see everything that is currently in scope, the Locals window is the way to go.
And if you want a superset of that (which has both current and previous statement), use the Autos window.
The QuickWatch dialog box is similar in concept to the Watch window, but QuickWatch can display only one variable or expression at a time
https://msdn.microsoft.com/en-us/library/bhawk8xd.aspx

Related

Intellisense autocompletion of expressions to watch in watch window or debug console

Is it possible while debugging, and a breakpoint has been hit, to autocomplete variables in the current scope in the Debug Console or the Watch Window?
An example gif is attached of where I would hope to get some auto-completion suggestions.
Essentially, on typing just long, I would like to autocomplete to work here so that it suggests longish_variable_name that I can then possibly tab complete.
VSCode has, by default, CtrlSpace mapped to triggering autocompletion suggestions, but this only seems to work in the editor window.
Use the variable once in the debug window, and auto-complete will do the rest of the work for you ever after (given the variable name shouldn't be changed, or you need to use it in the debugger console again to get auto-completion suggestion.)
I have a test variable named very_very_long_var — but the debug window didn't suggest anything on the first go. It was presented once I used it the first time in that window.

Dockable windows are not reinstated correctly

This is my first question in this community. I always search a lot when having problems and I always find an answer. But not in this one. Maybe I am not asking Google correctly.
Anyways this looks like a bug to me but I might get it wrong.
Using VS2012 (or 2013) I create the default Multiple documents MFC application. I do not write a single line of code. I compile and run. Then as a user I dock the properties window which by default is at the right to the output window as shown below .
Then I close the application and restart. The window is where it should be but with different width as shown below
If you dock the window to the right (in the view and not in another window) then there is no problem. The position and width are restored just fine. Also this only happens if the main window is maximized. The behaviour, if the main window is not, is as expected.
Do you think it is actually how Microsoft wanted to make this work or they missed that? Is there a workaround for this?
Again forgive me if this question has been asked before but really...
I couldn't find anything.
Appreciate any kind of help.

Visual Studio 2013 - Variable Value Window In Debugging

I am a newbie programmer, and have Visual Studio Update 3 on my computer. I cannot find the window that displays the values of variables as I am debugging.
I have looked under the pull-down tab at the top entitled "Debug" and "Window", and cannot find anything. I do not know exactly what the window is called either. Please help.
If you're looking for the scoped local variable values or Autos:
you must first have the debugger running, then goto:
DEBUG => Windows => Autos
and
DEBUG => Windows => Locals
to actually see those values, you need to have a debug stopper in place and it get hit by the program.
Alternatively you can - while debugging - highlight a variable name and use the 'Quick Watch'
In the default layout, the Locals window will typically be visible in the lower left pane, but only while debugging is active.
Here you can see the debugger windows on the bottom. The left side shows current breakpoints while the right side is showing watched variables in the pane labeled Watch 1. At the bottom you'll see other panes available to display in the lower left, specifically Call Stack, Command Window, etc. The one you want to see all in scope variables at a given breakpoint is Locals
If you have closed the locals window, or otherwise cannot find it, there is a way to re-open it through the Debug->Windows menu as pnm points out

GLUT_ICON not working on top left window

am trying to add an icon application that uses freeglut, according to the doc here it seems is enough to have an icon resource GLUT_ICON.
Although it worked, it only appears on the icon of the console window and the executable in windows explorer, but the main window remains with the default windows icon (as shown in the image). I tried building without the console window mode, but I get same behavior, is this the way it suppose to work or am getting a wrong behavior?
This might help clear things for others running into the same problem:
https://www.gamedev.net/forums/topic/151647-opengl-glut-icon/
Basically, in the "file.rc"resource-file (right click view code) that appears after adding an ico resouce, where you should have
MAINICON ICON "compiler_assets\\icon-name.ico" //set main icon to "file"
You should add another line
GLUT_ICON ICON DISCARDABLE "compiler_assets\\icon-name.ico"
Which is basically setting GLUT_ICON to a specific .ico file
Finally fixed this problem. Whether this issues come from the VStudio2012 environment or not is uncertain.
But generating the resource id like this; GLUT_ICON creates a non-defined behavior. The exe is unable to identify this tag as a valid one, therefore no icon can be indexed and found.
By just changing to lower case the string, all problems get fixed.
I did this process manually and the fix seems to be consistent between PC's.

Visual C++ 2005: How to view the window during a debugging session

Is this possible? When I'm debugging a program I can't bring the window up to see any changes. It's minimized during the debugging while I step through the program and I'd like to see the program changes while I step.
The only way I might see it is in Windows 7 you can hover over the task-bar to get a look at the program but the preview image gets in the way and It's just a weird way to see my program.
I've been trying to search for this problem but all I get is irrelevant results. Maybe I'm missing a few keywords or something. I don't know what to call my problem.
Two choices:
Don't maximize the IDE window and make it smaller until you can see the program window.
Have two monitors and put the program window on the secondary monitor.