FDebug

[FDebug](API\Runtime\Core\Misc\FDebug) These functions offer debugging and diagnostic functionality and its presence depends on compiler switches.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/AssertionMacros.h

Include

#include "Misc/AssertionMacros.h"

Syntax

struct FDebug

Remarks

FDebug These functions offer debugging and diagnostic functionality and its presence depends on compiler switches.

Functions

Name Description

Public function Static

void

 

AssertFailed

(
    const ANSICHAR* Expr,
    const ANSICHAR* File,
    int32 Line,
    const TCHAR* Format,
    ...
)

Logs final assert message and exits the program.

Public function Static

void

 

CheckVerifyFailed

(
    const ANSICHAR* Expr,
    const char* File,
    int32 Line,
    const FmtType& Format,
    Types... Args
)

Called when a 'check/verify' assertion fails.

Public function

void

 

CheckVerifyFailed

(
    const ANSICHAR* Expr,
    const ANSICHAR* File,
    const int Line,
    const FmtType& Format,
    Types... Args
)

"check" expressions are only evaluated if enabled.

Public function Static

void

 

DumpStackTraceToLog

(
    const ELogVerbosity::Type LogVerbos...
)

Dumps the stack trace into the log, meant to be used for debugging purposes.

Public function Static

void

 

DumpStackTraceToLog

(
    const TCHAR* Heading,
    const ELogVerbosity::Type LogVerbos...
)

Dumps the stack trace into the log with a custom heading, meant to be used for debugging purposes.

Public function Static

void

 

EnsureFailed

(
    const ANSICHAR* Expr,
    const ANSICHAR* File,
    int32 Line,
    const TCHAR* Msg,
    int NumStackFramesToIgnore
)

Called when an 'ensure' assertion fails; gathers stack data and generates and error report.

Public function Static

SIZE_T

 

GetNumEnsureFailures()

Returns the number of times an ensure has failed in this instance.

Public function Static

bool

 

HasAsserted()

Returns true if an assert has occurred

Public function Static

bool

 

IsEnsuring()

Returns true if an ensure is currently in progress (e.g. the RenderThread is ensuring)

Public function Static

void

 

LogFormattedMessageWithCallstack

(
    const FName& LogName,
    const ANSICHAR* File,
    int32 Line,
    const TCHAR* Heading,
    const TCHAR* Message,
    ELogVerbosity::Type Verbosity
)

Logs an a message to the provided log channel.

Public function Static

TEnableIf< T...

 

OptionallyLogFormattedEnsureMessageReturningFalse

(
    bool bLog,
    const ANSICHAR* Expr,
    const ANSICHAR* File,
    int32 Line,
    const FmtType& FormattedMsg,
    Types... Args
)

Logs an error if bLog is true, and returns false.

Public function Static

void

 

ProcessFatalError()

Triggers a fatal error, using the error formatted to GErrorHist via a previous call to FMsg

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss