Spaceman DMM Proc Debugging

Allows you to debug via breakpoints when a runtime occurs, and chase the proc call stack in VSCode.

Run by hitting F5 and allowing the game to run from there, then when it hits a runtime, the game will pause, allowing you to view what caused/led up to the runtime.
This commit is contained in:
Rykka Stormheart
2023-02-17 09:33:22 -08:00
parent ddedbf2a8c
commit 0834b01457
2 changed files with 30 additions and 2 deletions

View File

@@ -4,3 +4,6 @@ dreamchecker = true
[code_standards] [code_standards]
disallow_relative_type_definitions = true disallow_relative_type_definitions = true
disallow_relative_proc_definitions = true disallow_relative_proc_definitions = true
[debugger]
engine = "auxtools"

View File

@@ -41,6 +41,13 @@
src.update_status() src.update_status()
setup_season() //VOREStation Addition setup_season() //VOREStation Addition
// CHOMPStation Addition: Spaceman DMM Debugging
var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
if (debug_server)
call(debug_server, "auxtools_init")()
enable_debugging()
// CHOMPStation Add End
. = ..() . = ..()
#if UNIT_TEST #if UNIT_TEST
@@ -775,3 +782,21 @@ var/global/game_id = null
game_id = "[c[(t % l) + 1]][game_id]" game_id = "[c[(t % l) + 1]][game_id]"
t = round(t / l) t = round(t / l)
return 1 return 1
// CHOMPStation Add: Spaceman DMM Debugger
/proc/auxtools_stack_trace(msg)
CRASH(msg)
/proc/auxtools_expr_stub()
CRASH("auxtools not loaded")
/proc/enable_debugging(mode, port)
CRASH("auxtools not loaded")
/world/Del()
var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
if (debug_server)
call(debug_server, "auxtools_shutdown")()
. = ..()
// CHOMPStation Add End: Spaceman DMM Debugger