Visual Studio Debugger: Get access to StaticClass() in watch window

Hey Guys,

What’s the best way to get access to the StaticClass via debugger? It appears that StaticClass() is wrapped in GetPrivateStaticClass(), which has function level static variable to PrivateStaticClass.

in the watch window does not return valid pointer.

FYI: I’m running Debug executable.


Adding a function call to a watch window wouldn’t do anything - it needs a memory address.

Off the top of my head, I would add this line to my code:

auto theStaticClass = MyClass::StaticClass();

This would give the return of the StaticClass() function into a local variable, where you could then look at it, at least in theory…

Give that a shot, I’m not at my workstation but I think that should work…

hey philip, thanks for the suggestion.

i was hoping for a solution that works with any arbitrary UClass - not having to manually add code everytime i wanted to inspect a UClass or CDO.