Debug Mode – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
(Fixed formatting)
m (some tweaks)
Line 4: Line 4:


{{TOC|side}}
{{TOC|side}}
Arma 3, since {{GVI|arma3|2.01}}, has an additional debug mode that can be enabled with the -debug startup parameter. Enabling it causes the game engine to be more verbose with its logging, providing additional contextual information for some information, and logging information that it otherwise wouldn't.
Arma 3, since {{GVI|arma3|2.02}}, has an additional debug mode that can be enabled with the [[Arma 3: Startup Parameters|-debug startup parameter]]. Enabling it causes the game engine to be more verbose with its logging, providing additional contextual information for some information, and logging information that it otherwise wouldn't.


=== Additional context ===
=== Additional context ===


When in debug mode, many errors will provide additional context around where the error occurred. This will happen in script, [[Stringtable.xml]] and [[Description.ext]] errors. For example in scripts, this is full stack trace showing error origin:
When in debug mode, many errors will provide additional context around where the error occurred. This will happen for script, [[Stringtable.xml]] and [[Description.ext]] errors. For example in scripts, this is the full stack trace showing error origin:


  <nowiki>
  <nowiki>
Line 24: Line 24:
=== Additional errors ===
=== Additional errors ===


Debug mode also unlocks additional errors that are hidden during normal execution. An example of it, coming in {{GVI|arma3|2.07}}, is a check on {{getVariable}} that logs if it is called on a null object.
Debug mode also unlocks additional errors that are hidden during normal execution. An example of it, coming in {{GVI|arma3|2.08}}, is a check on [[getVariable]] that logs if it is called on a null object.


=== A3_DEBUG Preprocessor Macros ===
=== <code>A3_DEBUG</code> Preprocessor Macros ===


When Arma 3 is in debug mode, an additional preprocessor macro is set that can be used by developers to change functionality when this mode. For more details see [[PreProcessor_Commands#A3_DEBUG]]
When Arma 3 is in debug mode, an additional preprocessor macro is set that can be used by developers to change functionality when this mode. For more details see [[PreProcessor_Commands#A3_DEBUG]]

Revision as of 11:30, 12 October 2021


Arma 3, since Arma 3 logo black.png2.02, has an additional debug mode that can be enabled with the -debug startup parameter. Enabling it causes the game engine to be more verbose with its logging, providing additional contextual information for some information, and logging information that it otherwise wouldn't.

Additional context

When in debug mode, many errors will provide additional context around where the error occurred. This will happen for script, Stringtable.xml and Description.ext errors. For example in scripts, this is the full stack trace showing error origin:

18:01:30 Attempt to override final function - ace_captives_fnc_doapplyhandcuffs
18:01:30  ➥ Context:     [] L582 (A3\functions_f\initFunctions.sqf)
    [] L609 (A3\functions_f\initFunctions.sqf)
    [] L608 (A3\functions_f\initFunctions.sqf)
    [] L603 (A3\functions_f\initFunctions.sqf)
    [] L605 (A3\functions_f\initFunctions.sqf)
    [] L5 (z\gf_scripts\addons\gf_scripts\functions\fn_postInit.sqf)
    [] L3 (z\gf_scripts\addons\gf_scripts\functions\fn_logHandcuffs.sqf)
    [] L4 (z\gf_scripts\addons\gf_scripts\functions\fn_logHandcuffs.sqf)
    [] L13 (z\gf_scripts\addons\gf_scripts\functions\fn_logHandcuffs.sqf)

Additional errors

Debug mode also unlocks additional errors that are hidden during normal execution. An example of it, coming in Arma 3 logo black.png2.08, is a check on getVariable that logs if it is called on a null object.

A3_DEBUG Preprocessor Macros

When Arma 3 is in debug mode, an additional preprocessor macro is set that can be used by developers to change functionality when this mode. For more details see PreProcessor_Commands#A3_DEBUG