Navigation
Unreal Engine C++ API Reference > Plugins > NetcodeUnitTest
References
Module | NetcodeUnitTest |
Header | /Engine/Plugins/NetcodeUnitTest/NetcodeUnitTest/Source/NetcodeUnitTest/Public/NUTUtilDebug.h |
Include | #include "NUTUtilDebug.h" |
Syntax
class FStackTraceManager
Remarks
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.
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
TMap< FString, FNUTStackTrace * > | Traces | A map of active debug stack traces |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
Base constructorFStackTraceManager |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() |
Destructor |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
void | Adds a new stack trace, to the specified trace, optionally logging/dumping in the process | |
![]() |
void | Clears the specified trace from tracking | |
![]() |
bool | ContainsTrace
(
FString TraceName |
Whether or not a trace of this name is present |
![]() |
void | Passes on a 'Disable' call, to the specified stack trace (if it exists) | |
![]() |
void | Dumps accumulated stack traces, and removes from tracking (unless otherwise specified) | |
![]() |
void | DumpAll
(
bool bKeepTraceHistory, |
Dumps accumulated stack traces, for all tracked traces |
![]() |
void | Passes on an 'Enable' call, to the specified stack trace | |
![]() |
FNUTStackTrace * | GetOrCreateTrace
(
FString TraceName, |
Gets or creates a trace, of the specified name |
![]() |
FNUTStackTrace * | Gets the trace of the specified name, or NULL if it doesn't exist | |
![]() |
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) |