Skip to content

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 for LogCallstack 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...
  • 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)

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)
  • 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
  • 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.

===============

Callstack Item Types:

===============

Other Types:

  • game_instruction
    • type string
    • name string
    • filename string
    • fileOffset number
Clone this wiki locally