Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Modules
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Modules/VisualizerDebuggingState.h |
| Include | #include "Modules/VisualizerDebuggingState.h" |
Syntax
struct FVisualizerDebuggingState
Remarks
Global visualizer state manager that handles the complexities of natvis lookup rules for DLLs and LiveCoding
The singleton instance of this class is forward declared in CoreGlobals.h (GCoreDebuggingState), with additional symbols added to each DLL through UE_VISUALIZERS_HELPERS (GDebuggingState).
When a plugin or engine system needs to provide a globally accessible pointer to a natvis visualizer, that pointer can be added by calling FVisualizerDebuggingState::Assign using a globally unique ID that is used to find the pointer in the natvis. GUIDs may be generated using any readily-available GUID generator tool.
Pointers are located using an intrinsic call to strstr that finds the pointer's offset using a string match of the original GUID's lower-case, 32-character string representation of the form "c198d347ec1243ec833c423bd5fb6084". The offset of the address of the match divided by 32 gives the entry index from which the actual debug ptr can be retrieved.
An example visualizer syntax is included below. It is recommended that most natvis files utilizing this method would include an global intrinsic function at the top for quick access:
// C++: struct FMyGlobalState { static FMyGlobalState* GetSingleton(); TArray
// Register the global state FGuid DebugVisualizerID(0x1bdc1747, 0x6b924697, 0xbd8fccc8, 0xb26b4f79) EVisualizerDebuggingStateResult Result = FVisualizerDebuggingState::Assign(DebugVisualizerID, FMyGlobalState::GetSingleton());
// .natvis:
Variables
| Type | Name | Description | |
|---|---|---|---|
| const char * | GuidString | Single string containing all GUID strings ordered by their insertion order. | |
| FVisualizerDebuggingStateImpl * | PimplData | Pimpl to avoid pulling in too many headers since this header is included everywhere | |
| void ** | Ptrs | Array of void* ptrs to the user-provided debugging state ptrs for each entry. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| EVisualizerDebuggingStateResult | Assign a globally accessible debugging state ptr by name, potentially overwriting a previously assigned ptr | ||
| EVisualizerDebuggingStateResult | AssignImpl
(
const FGuid& UniqueId, |
Implementation function for Assign | |
| void * | Attempt to locate the index of the specified unique ID |
Operators
| Type | Name | Description | |
|---|---|---|---|
| void | operator=
(
const FVisualizerDebuggingState& |
||
| void |