-
Notifications
You must be signed in to change notification settings - Fork 8
API commands
Dedmen Miller edited this page Dec 30, 2018
·
8 revisions
Commands:
- getVersionInfo(1)
- returns <versionInfo packet>
- addBreakpoint(2)
-
data-
filenamefull path to scriptfile. Example"\\x\\cba\\addons\\common\\fnc_currentUnit.sqf" -
lineline of the script -
labela optional name for this breakpoint. Currently only used forLogCallstackaction -
condition(optional)-
type(1: Code) -
codeif 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) -
codeif type is 1 this contains a SQF script that will be executed when the breakpoint is hit. -
basePathif type is 3 this contains the path to a file where the log will be written to. The filename will be<basePath><label><hitcount>.jsonso you should end the basePath with a\.
-
-
-
- delBreakpoint(3)
-
data-
filenamefull path to scriptfile. Example"\\x\\cba\\addons\\common\\fnc_currentUnit.sqf" -
lineline of the script
-
-
- BPContinue(4)
-
dataContains 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-
nameARRAY of Strings. List of variable names to retrieve. Might also be a local variable. -
scopea 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)
-
fileFilename 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)
-
buildbuildnumber of the debugger -
versionversionstring of the debugger -
archThe string "X64" or "X86" -
gameType"game type" of the Arma binary. Release/performance/profiling/diag -
gameVersionversion 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)
-
callstackArray of callstack scopes (Optional, if it's not there then consider it empty)-
variableslocal variables of that scope https://gist.github.com/dedmen/747a8d2eb7c0e2a82b90c60a810a2987#file-bp_cba_currentunit-json-L1326 -
typeclass 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-
fileOffsetas above -
typeEnum https://github.com/dedmen/ArmaDebugEngine/blob/e0025310a2c7ca795e400ef460e9975ba3ec5268/BIDebugEngine/BIDebugEngine/RVClasses.cpp#L150 -
messageerror message from the game (like in RPT) -
fileNameerror file (like in RPT) -
contentthe 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-
fileOffsetas above filename-
contentthe 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-
haltas 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.
-
dataArray of variables https://gist.github.com/dedmen/747a8d2eb7c0e2a82b90c60a810a2987#file-bp_cba_currentunit-json-L1326-
type`"void"/... -
nameName of the variable -
nsThe namespace enum. (Only if variable was found) -
valueif 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-
fileNameString. Filepath to source file of contained code. -
contentSampleString. First 100 characters of code. -
ipString. Current Instruction pointer -
lastInstructiongame_instruction(See below). Current executing instruction
-
-
CallStackItemData-
fileNameString. Filepath to source file of contained code. -
contentSampleString. First 100 characters of code. -
ipString. Current Instruction pointer -
lastInstructiongame_instruction(See below). Current executing instruction -
compiledlist of all script instructions of that scope.ipis the 1-based index of this array of the current instruction https://gist.github.com/dedmen/747a8d2eb7c0e2a82b90c60a810a2987#file-bp_cba_currentunit-json-L12 -
finalwhether code was compileFinal'ed
-
-
CallStackItemArrayForEach(https://community.bistudio.com/wiki/forEach)-
forEachIndexNumber. Current index the loop is at.
-
-
CallStackItemApply(https://community.bistudio.com/wiki/apply)-
forEachIndexNumber. Current index the loop is at.
-
-
CallStackItemConditionSelect(https://community.bistudio.com/wiki/select)-
forEachIndexNumber. Current index the loop is at.
-
-
CallStackItemArrayFindCond(https://community.bistudio.com/wiki/findIf)-
forEachIndexNumber. Current index the loop is at.
-
-
CallStackItemForBASIC(https://community.bistudio.com/wiki/for non-array variant)-
varNameString -
varValueNumber -
toNumber -
stepNumber
-
===============
Other Types:
- game_instruction
-
typestring -
namestring -
filenamestring -
fileOffsetnumber
-