-
Notifications
You must be signed in to change notification settings - Fork 10
API commands
Dedmen Miller edited this page Dec 30, 2018
·
8 revisions
Commands:
- getVersionInfo(1)
- returns <versionInfo packet>
- addBreakpoint(2)
-
data
-
filename
full path to scriptfile. Example"\\x\\cba\\addons\\common\\fnc_currentUnit.sqf"
-
line
line of the script -
label
a optional name for this breakpoint. Currently only used forLogCallstack
action -
condition
(optional)-
type
(1: Code) -
code
if type is 1 this contains a SQF script that will be executed and should return true/false
-
-
action
-
type
(1: ExecCode, 2: Halt, 3: LogCallstack) -
code
if type is 1 this contains a SQF script that will be executed when the breakpoint is hit. -
basePath
if type is 3 this contains the path to a file where the log will be written to. The filename will be<basePath><label><hitcount>.json
so you should end the basePath with a\
.
-
-
-
- delBreakpoint(3)
-
data
-
filename
full path to scriptfile. Example"\\x\\cba\\addons\\common\\fnc_currentUnit.sqf"
-
line
line of the script
-
-
- BPContinue(4)
-
data
Contains StepType (0: continue, 1: stepInto, 2: stepOver, 3: stepOut) - returns <ContinueExecution> and might immediately after return a <halt_step>
-
- MonitorDump(5)
- Dumps all Monitors to
"P:\\Monitor_knownScriptFiles.json"
Which should contain all known script files. This is a debug command.. A debugger debug command...
- Dumps all Monitors to
- setHookEnable(6)
- Enables/Disables the "hook". Was a special feature to "disable" the debugger to allow all scripts to run at full speed without the debugger interfering. Currently not used.
- getVariable(7)
-
data
-
name
ARRAY of Strings. List of variable names to retrieve. Might also be a local variable. -
scope
a bitset of scopes to check.
-
-
enum class VariableScope { //This is a bitflag
invalid = 0,
callstack = 1,
local = 2,
missionNamespace = 4,
uiNamespace = 8,
profileNamespace = 16,
parsingNamespace = 32
};
* **returns** \<VariableReturn\>
- getCurrentCode(8)
-
file
Filename of the file. - This only works when currently halting. It traverses the entire callstack to find the file and returns it's content
- returns a bare string of the content
-
- getAllScriptCommands(9)
- returns all script commands in the format: https://gist.github.com/dedmen/75ae1319d9a958c6492e44b734fdb609
Return messages:
- versionInfo(1)
-
build
buildnumber of the debugger -
version
versionstring of the debugger -
arch
The string "X64" or "X86" -
gameType
"game type" of the Arma binary. Release/performance/profiling/diag -
gameVersion
version of the Arma binary."1.82.144709"
-
HI
"Hook Integrity" structure. Contains information about whether the debugger correctly initialized.- "SvmCon", HI.__scriptVMConstructor
- "SvmSimSt", HI.__scriptVMSimulateStart
- "SvmSimEn", HI.__scriptVMSimulateEnd
- "InstrBP", HI.__instructionBreakpoint
- "WSim", HI.__worldSimulate
- "WMEVS", HI.__worldMissionEventStart
- "WMEVE", HI.__worldMissionEventEnd
- "ScrErr", HI.__onScriptError
- "PreDef", HI.scriptPreprocDefine
- "PreCon", HI.scriptPreprocConstr
- "ScrAass", HI.scriptAssert
- "ScrHalt", HI.scriptHalt
- "Alive", HI.engineAlive
- "EnMouse", HI.enableMouse
-
- halt_breakpoint(2) The debugger halted because of a set breakpoint (https://gist.github.com/dedmen/747a8d2eb7c0e2a82b90c60a810a2987)
-
callstack
Array of callstack scopes (Optional, if it's not there then consider it empty)-
variables
local variables of that scope https://gist.github.com/dedmen/747a8d2eb7c0e2a82b90c60a810a2987#file-bp_cba_currentunit-json-L1326 -
type
class CallStackItemData
/class CallStackItemSimple
(These strings might be changed later in development) Look below for Callstack Item types.halted on. game_instruction type
-
-
- halt_step(3) The debugger halted because you are stepping
-
callstack
(Optional, if it's not there then consider it empty) instruction
-
- halt_error(4) The debugger halted because of a script error
-
callstack
(Optional, if it's not there then consider it empty) instruction
-
error
-
fileOffset
as above -
type
Enum https://github.com/dedmen/ArmaDebugEngine/blob/e0025310a2c7ca795e400ef460e9975ba3ec5268/BIDebugEngine/BIDebugEngine/RVClasses.cpp#L150 -
message
error message from the game (like in RPT) -
fileName
error file (like in RPT) -
content
the full content of the script file
-
-
- halt_scriptAssert(5) The debugger halted because a https://community.bistudio.com/wiki/assert failed
-
callstack
(Optional, if it's not there then consider it empty) instruction
-
halt
-
fileOffset
as above filename
-
content
the full content of the script file
-
-
- halt_scriptHalt(6) The debugger halted because a https://community.bistudio.com/wiki/halt was executed
-
callstack
(Optional, if it's not there then consider it empty) instruction
-
halt
as above
-
- halt_placeholder(7) Well.. placeholder..
- ContinueExecution(8) We have left the halt state and the game is now executing again.
- VariableReturn(9) Answer to getVariable request.
-
data
Array of variables https://gist.github.com/dedmen/747a8d2eb7c0e2a82b90c60a810a2987#file-bp_cba_currentunit-json-L1326-
type
`"void"/... -
name
Name of the variable -
ns
The namespace enum. (Only if variable was found) -
value
if type is array then this is an array of "values". If it's string then just string. If it's code then the compact(removes empty newlines) string version of the code.
-
-
===============
Callstack Item Types:
-
CallStackItemSimple
-
fileName
String. Filepath to source file of contained code. -
contentSample
String. First 100 characters of code. -
ip
String. Current Instruction pointer -
lastInstruction
game_instruction
(See below). Current executing instruction
-
-
CallStackItemData
-
fileName
String. Filepath to source file of contained code. -
contentSample
String. First 100 characters of code. -
ip
String. Current Instruction pointer -
lastInstruction
game_instruction
(See below). Current executing instruction -
compiled
list of all script instructions of that scope.ip
is the 1-based index of this array of the current instruction https://gist.github.com/dedmen/747a8d2eb7c0e2a82b90c60a810a2987#file-bp_cba_currentunit-json-L12 -
final
whether code was compileFinal'ed
-
-
CallStackItemArrayForEach
(https://community.bistudio.com/wiki/forEach)-
forEachIndex
Number. Current index the loop is at.
-
-
CallStackItemApply
(https://community.bistudio.com/wiki/apply)-
forEachIndex
Number. Current index the loop is at.
-
-
CallStackItemConditionSelect
(https://community.bistudio.com/wiki/select)-
forEachIndex
Number. Current index the loop is at.
-
-
CallStackItemArrayFindCond
(https://community.bistudio.com/wiki/findIf)-
forEachIndex
Number. Current index the loop is at.
-
-
CallStackItemForBASIC
(https://community.bistudio.com/wiki/for non-array variant)-
varName
String -
varValue
Number -
to
Number -
step
Number
-
===============
Other Types:
- game_instruction
-
type
string -
name
string -
filename
string -
fileOffset
number
-