# Diagnostic (scripting commands)

- [diag_activeMissionFSMs](../../commands/diag_activeMissionFSMs.md): Returns array with active Mission FSMs. To see number of all scripts currently in the scheduler use diag_activeScripts.
- [diag_activeScripts](../../commands/diag_activeScripts.md): Returns 4 element array with numbers of currently running scripts
- [diag_activeSQFScripts](../../commands/diag_activeSQFScripts.md): Returns information about active SQF scripts. To see number of all scripts currently in the scheduler use diag_activeScripts.
- [diag_activeSQSScripts](../../commands/diag_activeSQSScripts.md): Returns array with active SQSs. To see number of all scripts currently in the scheduler use diag_activeScripts.
- [diag_allMissionEventHandlers](../../commands/diag_allMissionEventHandlers.md): Returns an array with all mission event handlers.
- [diag_captureFrame](../../commands/diag_captureFrame.md): This command starts counting frames from the moment it is executed and when the count reaches the number passed as param, the current frame is captured and captured data UI dialog appears, similar to…
- [diag_captureFrameToFile](../../commands/diag_captureFrameToFile.md): This command starts counting frames from the moment it is executed and when the count reaches the number passed as param, the current frame is captured and written to a log file in the same directory as the .rpt file.
- [diag_captureSlowFrame](../../commands/diag_captureSlowFrame.md): Opens "capture frame" dialog if current frame exceeds set threshold in seconds. One can indicate to either capture duration of a specific profiling selection or the total duration of the frame.
- [diag_codePerformance](../../commands/diag_codePerformance.md): Attempts to run given code with given arguments given number of cycles in unscheduled environment and returns average time it took to run the code as well as actual number of executions performed.
- [diag_deltaTime](../../commands/diag_deltaTime.md): Returns the duration of the previous frame in seconds
- [diag_drawMode](../../commands/diag_drawMode.md): Activates a debug visualisation.
- [diag_dumpCalltraceToLog](../../commands/diag_dumpCalltraceToLog.md): Dumps current callstack/calltrace to RPT.
- [diag_dumpScriptAssembly](../../commands/diag_dumpScriptAssembly.md): Dump script assembly.
- [diag_dumpTerrainSynth](../../commands/diag_dumpTerrainSynth.md): Returns OutsideTerrain's current world's values.
- [diag_dynamicSimulationEnd](../../commands/diag_dynamicSimulationEnd.md): Ends dynamic simulation data gathering and writes collected data into given (txt) file. The file is saved in the Arma 3 installation folder.
- [diag_dynamicSimulationStart](../../commands/diag_dynamicSimulationStart.md): Starts gathering Arma 3: Dynamic Simulation diagnostic data.
- [diag_enable](../../commands/diag_enable.md): Toggles various diagnostics.
- [diag_enabled](../../commands/diag_enabled.md): Checks whether specific diagnostic mode is activated.
- [diag_exportConfig](../../commands/diag_exportConfig.md): Exports given config into file of given path.
- [diag_exportTerrainSVG](../../commands/diag_exportTerrainSVG.md): Like the old TOPOGRAPHY cheat code, exports terrain, but in modern SVG format instead of the proprietary EMF format.
- [diag_fps](../../commands/diag_fps.md): Returns average framerate calculated over last 16 frames.
- [diag_fpsMin](../../commands/diag_fpsMin.md): Returns minimal framerate. Calculated from the longest frame over last 16 frames.
- [diag_frameNo](../../commands/diag_frameNo.md): Returns number of frame currently displayed.
- [diag_getTerrainGrid](../../commands/diag_getTerrainGrid.md) **[deprecated]**: Returns terrain cell size (size of each grid cell in the Heightmap).
- [diag_getTerrainHeight](../../commands/diag_getTerrainHeight.md) **[deprecated]**: Returns terrain height at the specified location.
- [diag_getTerrainSegmentOffset](../../commands/diag_getTerrainSegmentOffset.md): Returns the terrain segment. It is basically the same as:
- [diag_lightNewLoad](../../commands/diag_lightNewLoad.md): Allows loading of lighting config during the gameplay (effectively changing the current scene lighting). Filename path can be either absolute or relative.
- [diag_list](../../commands/diag_list.md): Returns an array of all diagnostic modes available in the game.
- [diag_log](../../commands/diag_log.md): Dumps the argument's value to the report file. Each call creates a new line in the file.
- [diag_mergeConfigFile](../../commands/diag_mergeConfigFile.md): Updates config without restarting. Attributes and classes can not be deleted unless `delete` is used. Changes to the config are applied to all new entities, a mission restart is not necessarily required.
- [diag_recordTurretLimits](../../commands/diag_recordTurretLimits.md): Start recording tool for creating turret aiming limits.
- [diag_resetAnims](../../commands/diag_resetAnims.md): Resets the animations system cache, so that animation makers can test their animations without restarting the game. A mission restart is required for the changes to be applied.
- [diag_resetShapes](../../commands/diag_resetShapes.md): Reload models on-the-fly without the need of restarting the game. Changes applied by diag_resetShapes are applied to all new entities so restart of mission is not necessarily required - spawning vehicle again or…
- [diag_scope](../../commands/diag_scope.md): Returns script scope depth. When script is directly executed by the engine or a new script is added to the scheduler, the scope depth is 0. The examples of such execution are event handlers, spawn, etc.
- [diag_setLightNew](../../commands/diag_setLightNew.md): Overrides currently used scene lighting. The operand is config that is placed as a string (not file). The changes may not be applied immediately, but can be forced by the call of simulWeatherSync.
- [diag_setTerrainHeight](../../commands/diag_setTerrainHeight.md) **[deprecated]**: Changes the terrain height of the cell in which given position lies. This command is only available with Arma 3: Diagnostics Exe.
- [diag_SQFCDebugDump](../../commands/diag_SQFCDebugDump.md): Dumps the bytecode as Arma 3 sees it, in a diff friendly way. Useful for testing custom SQFC compilers.
- [diag_stacktrace](../../commands/diag_stacktrace.md): Returns an array containing the function name, line number, scope name and all local variables in form of a hashmap.
- [diag_testScriptSimpleVM](../../commands/diag_testScriptSimpleVM.md): Outputs the provided SQF code's end code.
- [diag_tickTime](../../commands/diag_tickTime.md): Real time in seconds spent from the start of the game. On Windows the command uses timeGetTime.
- [diag_toggle](../../commands/diag_toggle.md): Toggles various diagnostics.
- [echo](../../commands/echo.md) **[broken]**: Sends any text into the debugger console or the logfile. This command is only present in internal version not in the retail version. Use diag_log instead!
- [enableDiagLegend](../../commands/enableDiagLegend.md): Enable or disable the legend for diagnostics. Internal dev only!
- [exportJIPMessages](../../commands/exportJIPMessages.md): Creates a log file containing an overview on all JIP (network) messages currently in the JIP queue. The file is created in the same directory as .rpt file.
- [isFilePatchingEnabled](../../commands/isFilePatchingEnabled.md): Returns true if file patching is enabled otherwise false
- [logEntities](../../commands/logEntities.md): Creates a log file containing the list of all game entities in scene. The file is created in the same directory as .rpt file.
- [logNetwork](../../commands/logNetwork.md): Registers new log file recording a network traffic and returns handle of the log. The log file is saved inside the Arma 3 root folder.
- [logNetworkTerminate](../../commands/logNetworkTerminate.md): Terminates a network log file started with logNetwork with the given handle
- [setCustomMissionData](../../commands/setCustomMissionData.md): Defines custom mission text that is sent to Arma 3: Analytics.
