-
Notifications
You must be signed in to change notification settings - Fork 3
Console Commands
Most of the crashcapture Lua table is also available as cc_* console commands, so you can use it on servers without writing any Lua, and from the server console as well.
The exceptions are crashcapture.mem.* (gated behind CRASHCAPTURE_MEMAPI) and crashcapture.get("ready").
The commands register once the first Lua realm is up (right after loading, a frame or two later in plugin mode).
| Command | What it does |
|---|---|
cc_help |
List all commands. |
cc_dump [reason] |
Write a report right now, same as crashcapture.dump(). See Manual Dump. |
cc_set <key> <value> |
Change a setting at runtime, same rules and refusals as crashcapture.set(). |
cc_get [key] |
Read one setting, or list all of them when no key is given. |
cc_pulse |
Feed the freeze heartbeat manually. |
cc_trace |
Print a native backtrace of the current thread. |
cc_frametime |
Print the per-frame timing metrics, same as crashcapture.frametime(). |
cc_profile [limit] |
Print Lua call profiler results, same as crashcapture.profile(). See Lua Profiler. |
cc_profile_reset |
Zero the profiler counters and start a fresh window. |
cc_patches |
List the compiled-in engine patches and their state. See Patcher. |
cc_patch <id> [0|1] |
Enable or disable one patch by id, or re-enable it when omitted. |
Examples:
cc_get timeout
cc_set timeout 30
cc_dump checking what the game thread is doing
cc_profile 10
cc_patch gm.phys.contact_stale_core 0Settings keys mirror the settings, lower-cased and without the CRASHCAPTURE_ prefix, and cc_set disable 1 / cc_set disable 0 work like crashcapture.set("disable", ...).
On a client, a connected server can drive RunConsoleCommand and stufftext inside the client realm, and the engine dispatches those exactly like locally typed text, so the two cannot be told apart.
To keep Client Lua Isolation from being bypassed through the console, the state-changing commands (cc_dump, cc_set, cc_pulse, cc_profile_reset, cc_patch) refuse while a client realm is isolated:
] cc_dump
[Crash Capture] cc_dump refused: the client realm is isolated, a connected server must not be able to trigger itSetting CRASHCAPTURE_CLIENT_LUA=1 (or explicitly require()ing the module on the client) re-enables the full command set - one consent flag covers both the Lua API and the console.
On dedicated servers there is no client realm, so every command always works from the server console or RCON.
Getting started
Usage
Features
For module developers