Download

Variables Won't Display In Debug Watch Window

Not sure anyone else ran into this or if it is unique to my setup. When I try to hover over variables sometimes they won’t display. The same happens when trying to view them as Autos, Locals, and Watch. Some variables display fine while others don’t. A macro issue?

I can step through the code, although it is some what reminiscent of stepping through code on an embedded device where the debugger jumps around at the end of a function call. It kind of feels as if the loading of modules picked up the installed version of DLL’s, but stepping through different source. Has anyone else seen this?

What build configuration are you trying to debug? Development is optimized so local variables are not always possible to view in the watch window. Did you try building debug? It should work there fine.

Thanks for the reply Robert.

From memory, I thought I did try debug but not certain. Let me try again and reply back.

Using “Debug Editor” I still get some variables not displaying:

MiniDumpFilenameW.png
GGameThreadId+GIsGameThreadInitialized.png
523d20ce9181d5b212b89b2ec8be5ad5439fe884.png

MiniDumpFilenameW doesn’t display.
GGameThreadId nor GIsGameThreadInitialezed

And in the last image you can that bIsNotEditor (highlighted) displays while GIsGameAgnosticExe won’t display

Yeah, that’s a thing with VS, it’s not going to display global variables if they’re defined in a different module in non-monolithic builds. You need to use the context operator to specify which module it should look in for it:


{,,"UE4Editor-Core-Win64-Debug.dll"}GIsGameThreadIdInitialized

More info here:
http://msdn.microsoft.com/en-us/library/y2t7ahxk.aspx#BKMK_Using_context_operators_to_specify_a_symbol

Thanks for the link Robert. I’ll try it and reply back with my results.