Navigation
API > API/Plugins > API/Plugins/NetcodeUnitTest
Manager for handling multiple debug stack traces on-the-fly, and allowing abstraction of stack traces, so you don't have to manually handle FNUTStackTrace objects (which can be complicated/bug-prone).
This is a more intuitive way of handling tracing, you just use a call to 'GTraceManager->AddTrace' wherever needed, and add calls to 'Enable'/'Disable' whenever you want to accept/ignore AddTrace calls - then 'Dump' to see the results. No messing with managing instances of above objects.
This also hooks into console commands as well, allowing it to be used throughout the engine, instead of depending on this module. See the documentation for the 'StackTrace' command in UnitTestManager.cpp.
| Name | FStackTraceManager |
| Type | class |
| Header File | /Engine/Plugins/NetcodeUnitTest/NetcodeUnitTest/Source/NetcodeUnitTest/Public/NUTUtilDebug.h |
| Include Path | #include "NUTUtilDebug.h" |
Syntax
class FStackTraceManager
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FStackTraceManager() |
Base constructorFStackTraceManager | NUTUtilDebug.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FStackTraceManager() |
Destructor | NUTUtilDebug.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| IgnoreDepthOffset | int32 | Additional increment for the stack trace ignore depth, as set by FScopedIncrementTraceIgnoreDepth | NUTUtilDebug.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddTrace
(
FString TraceName, |
Adds a new stack trace, to the specified trace, optionally logging/dumping in the process | NUTUtilDebug.h | |
void Clear
(
FString TraceName |
Clears the specified trace from tracking | NUTUtilDebug.h | |
bool ContainsTrace
(
FString TraceName |
Whether or not a trace of this name is present | NUTUtilDebug.h | |
void Disable
(
FString TraceName |
Passes on a 'Disable' call, to the specified stack trace (if it exists) | NUTUtilDebug.h | |
void Dump
(
FString TraceName, |
Dumps accumulated stack traces, and removes from tracking (unless otherwise specified) | NUTUtilDebug.h | |
void DumpAll
(
bool bKeepTraceHistory, |
Dumps accumulated stack traces, for all tracked traces | NUTUtilDebug.h | |
void Enable
(
FString TraceName |
Passes on an 'Enable' call, to the specified stack trace | NUTUtilDebug.h | |
void TraceAndDump
(
FString TraceName |
Performs a once-off stack trace, with no tracking (but if there is already a trace active with this name, respect its 'enabled' status) | NUTUtilDebug.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FNUTStackTrace * GetOrCreateTrace
(
FString TraceName, |
Gets or creates a trace, of the specified name | NUTUtilDebug.h | |
FNUTStackTrace * GetTrace
(
FString TraceName |
Gets the trace of the specified name, or NULL if it doesn't exist | NUTUtilDebug.h |