diag stacktrace: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " |game1= arma3 |version1= 2.06 |branch= dev " to " |game1= arma3 |version1= 2.06 ") |
(added seeAlso) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 10: | Line 10: | ||
|s1= [[diag_stacktrace]] | |s1= [[diag_stacktrace]] | ||
|r1= [[Array]] in format: | |r1= [[Array]] of [[Array]]s, in format: | ||
< | <sqf>params ["_functionName", "_lineNumber", "_scopeName", "_variablesHashmap"];</sqf> | ||
* _functionName: [[String]] - function name | * _functionName: [[String]] - function name | ||
* _lineNumber: [[Number]] - line number | * _lineNumber: [[Number]] - line number | ||
Line 17: | Line 17: | ||
* _variablesHashmap: [[HashMap]] - all local variables | * _variablesHashmap: [[HashMap]] - all local variables | ||
|x1= < | |x1= <sqf> | ||
private _testvar = 1; | |||
private _testother = 2; | |||
call | |||
{ | { | ||
_testvar = 3; | _testvar = 3; | ||
if (_testvar == 3) then | |||
{ | { | ||
_myVariable = 4; | _myVariable = 4; | ||
hint str diag_stacktrace; | |||
}; | }; | ||
}; | }; | ||
/* | |||
[ | [ | ||
["", 3, "", [["_this", []], ["_testother", 2], ["_testvar", 3]]], | ["", 3, "", [["_this", []], ["_testother", 2], ["_testvar", 3]]], | ||
["", 6, "", []], | ["", 6, "", []], | ||
["", 8, "", [ | ["", 8, "", [["_myvariable", 4]]] | ||
] | ] | ||
*/ | |||
</sqf> | |||
|seealso= [[diag_dumpCalltraceToLog]] | |seealso= [[arma.RPT]] [[diag_dumpCalltraceToLog]] [[diag_log]] | ||
}} | }} |
Latest revision as of 20:47, 11 December 2023
Description
- Description:
- Returns an array containing the function name, line number, scope name and all local variables in form of a hashmap.
- Groups:
- Diagnostic
Syntax
- Syntax:
- diag_stacktrace
- Return Value:
- Array of Arrays, in format:
Examples
- Example 1:
Additional Information
- See also:
- arma.RPT diag_dumpCalltraceToLog diag_log
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note