Debug Console – Take On Helicopters

From Bohemia Interactive Community
Jump to navigation Jump to search
m (profileNameSpace -> profileNamespace)
m (Text replacement - "<code>" to "<code style="display: block">")
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Mission_Editor|Debug Console]]
[[Category: 2D Editor]]
[[File:tkoh editor debug.jpg|thumb|300px|right|Debug Console]]
[[File:tkoh editor debug.jpg|thumb|300px|right|Debug Console]]


== Menu ==
=== Starting ===
''Debug Console'' is started by pressing ''ESC'' and ''F1'' while previewing a mission.
 
=== Watch ===
=== Watch ===
Shows returned value of code written to one of four available fields. Refreshes it every 0.1 seconds, and will show scripting errors while you're writing the text.
Shows returned value of code written to one of four available fields. Refreshes it every 0.1 seconds, and will show scripting errors while you're writing the text.


Results of all fields are stored in _debug1 to _debug4 variables to which you can refer from other fields
Results of all fields are stored in _debug1 to _debug4 variables to which you can refer from other fields
* '''Field 1''':<code>1 + 1</code>
* '''Field 1''':<code style="display: block">1 + 1</code>
** Returns: 2
** Returns: 2
* '''Field 2''':<code>_debug1 * 2</code>
* '''Field 2''':<code style="display: block">_debug1 * 2</code>
** Returns: 4
** Returns: 4


Line 20: Line 22:


Same as Watch fields, Expressions are stored persistently.
Same as Watch fields, Expressions are stored persistently.


=== Custom scripts ===
=== Custom scripts ===
Executes ([[execVM]]) scripts on the given path.
Executes ([[execVM]]) scripts on the given path.
  \hsim\@debug\debug*.sqf
  \hsim\@debug\debug*.sqf
<nowiki>*</nowiki> is replaced by number weitten on a button, e.g. 1 executes \hsim\@debug\debug1.sqf
<nowiki>*</nowiki> is replaced by number written on a button, e.g. 1 executes \hsim\@debug\debug1.sqf


=== Camera ===
=== Camera ===

Latest revision as of 11:52, 11 January 2023

Debug Console

Starting

Debug Console is started by pressing ESC and F1 while previewing a mission.

Watch

Shows returned value of code written to one of four available fields. Refreshes it every 0.1 seconds, and will show scripting errors while you're writing the text.

Results of all fields are stored in _debug1 to _debug4 variables to which you can refer from other fields

  • Field 1:1 + 1
    • Returns: 2
  • Field 2:_debug1 * 2
    • Returns: 4

Content of all fields is stored into profileNamespace when console is closed and is restored again upon next start.

Expression

Six fields where you can write any code and execute it. Button uses execVM.

Alternatively, you can use keyboard shortcuts Ctrl1 to Ctrl+6 for each of the buttons.

Same as Watch fields, Expressions are stored persistently.

Custom scripts

Executes (execVM) scripts on the given path.

\hsim\@debug\debug*.sqf

* is replaced by number written on a button, e.g. 1 executes \hsim\@debug\debug1.sqf

Camera

Executes Camera.sqs

Config

Launch Config Viewer

Functions

Launch Functions Viewer

Effects

TBA