reckfellENGINE

ScriptBacktrace

A captured backtrace of a specific script language.

On this page
class ScriptBacktraceReckfellSharpInherits RefCounted

A captured backtrace of a specific script language.

ScriptBacktrace holds an already captured backtrace of a specific script language, such as C# or C#, which are captured using Engine.CaptureScriptBacktraces. See ProjectSettings.debug/settings/csharp/always_track_call_stacks and ProjectSettings.debug/settings/csharp/always_track_local_variables for ways of controlling the contents of this class.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

ScriptBacktraceConstructor
# ScriptBacktrace
C#
public ScriptBacktrace();

Methods16

Formatstring
# Format
C#
public string Format(int indentAll = 0, int indentFrames = 4);

Converts the backtrace to a string, where the entire string will be indented by indent_all number of spaces, and the individual stack frames will be additionally indented by indent_frames number of spaces. Note: Calling ReckfellObject.ToString on a ScriptBacktrace will produce the same output as calling ScriptBacktrace.Format with all parameters left at their default values.

Parameters
NameTypeDefault
indentAllint0
indentFramesint4
Returns string
GetFrameCountint
# GetFrameCount
C#
public int GetFrameCount();

Returns the number of stack frames in the backtrace.

Returns int
GetFrameFilestring
# GetFrameFile
C#
public string GetFrameFile(int index);

Returns the file name of the call site represented by the stack frame at the specified index.

Parameters
NameTypeDefault
indexint—
Returns string
GetFrameFunctionstring
# GetFrameFunction
C#
public string GetFrameFunction(int index);

Returns the name of the function called at the stack frame at the specified index.

Parameters
NameTypeDefault
indexint—
Returns string
GetFrameLineint
# GetFrameLine
C#
public int GetFrameLine(int index);

Returns the line number of the call site represented by the stack frame at the specified index.

Parameters
NameTypeDefault
indexint—
Returns int
GetGlobalVariableCountint
# GetGlobalVariableCount
C#
public int GetGlobalVariableCount();

Returns the number of global variables (e.g. autoload singletons) in the backtrace. Note: This will be non-zero only if the include_variables parameter was true when capturing the backtrace with Engine.CaptureScriptBacktraces.

Returns int
GetGlobalVariableNamestring
# GetGlobalVariableName
C#
public string GetGlobalVariableName(int variableIndex);

Returns the name of the global variable at the specified index.

Parameters
NameTypeDefault
variableIndexint—
Returns string
GetGlobalVariableValueVariant
# GetGlobalVariableValue
C#
public Variant GetGlobalVariableValue(int variableIndex);

Returns the value of the global variable at the specified index. Warning: With C# backtraces, the returned Variant will be the variable's actual value, including any object references. This means that storing the returned Variant will prevent any such object from being deallocated, so it's generally recommended not to do so.

Parameters
NameTypeDefault
variableIndexint—
Returns Variant
GetLanguageNamestring
# GetLanguageName
C#
public string GetLanguageName();

Returns the name of the script language that this backtrace was captured from.

Returns string
GetLocalVariableCountint
# GetLocalVariableCount
C#
public int GetLocalVariableCount(int frameIndex);

Returns the number of local variables in the stack frame at the specified index. Note: This will be non-zero only if the include_variables parameter was true when capturing the backtrace with Engine.CaptureScriptBacktraces.

Parameters
NameTypeDefault
frameIndexint—
Returns int
GetLocalVariableNamestring
# GetLocalVariableName
C#
public string GetLocalVariableName(int frameIndex, int variableIndex);

Returns the name of the local variable at the specified variable_index in the stack frame at the specified frame_index.

Parameters
NameTypeDefault
frameIndexint—
variableIndexint—
Returns string
GetLocalVariableValueVariant
# GetLocalVariableValue
C#
public Variant GetLocalVariableValue(int frameIndex, int variableIndex);

Returns the value of the local variable at the specified variable_index in the stack frame at the specified frame_index. Warning: With C# backtraces, the returned Variant will be the variable's actual value, including any object references. This means that storing the returned Variant will prevent any such object from being deallocated, so it's generally recommended not to do so.

Parameters
NameTypeDefault
frameIndexint—
variableIndexint—
Returns Variant
GetMemberVariableCountint
# GetMemberVariableCount
C#
public int GetMemberVariableCount(int frameIndex);

Returns the number of member variables in the stack frame at the specified index. Note: This will be non-zero only if the include_variables parameter was true when capturing the backtrace with Engine.CaptureScriptBacktraces.

Parameters
NameTypeDefault
frameIndexint—
Returns int
GetMemberVariableNamestring
# GetMemberVariableName
C#
public string GetMemberVariableName(int frameIndex, int variableIndex);

Returns the name of the member variable at the specified variable_index in the stack frame at the specified frame_index.

Parameters
NameTypeDefault
frameIndexint—
variableIndexint—
Returns string
GetMemberVariableValueVariant
# GetMemberVariableValue
C#
public Variant GetMemberVariableValue(int frameIndex, int variableIndex);

Returns the value of the member variable at the specified variable_index in the stack frame at the specified frame_index. Warning: With C# backtraces, the returned Variant will be the variable's actual value, including any object references. This means that storing the returned Variant will prevent any such object from being deallocated, so it's generally recommended not to do so.

Parameters
NameTypeDefault
frameIndexint—
variableIndexint—
Returns Variant
IsEmptybool
# IsEmpty
C#
public bool IsEmpty();

Returns true if the backtrace has no stack frames.

Returns bool
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.