Skip to content

Commit

Permalink
Замена дебаггера extools на auxtools (TauCetiStation#7118)
Browse files Browse the repository at this point in the history
  • Loading branch information
KIBORG04 authored May 10, 2021
1 parent e8770a3 commit 9684a4a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
3 changes: 3 additions & 0 deletions SpacemanDMM.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ dreamchecker = true
[code_standards]
disallow_relative_type_definitions = true
disallow_relative_proc_definitions = true

[debugger]
engine = "auxtools"
18 changes: 15 additions & 3 deletions code/__DEFINES/spaceman_dmm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,20 @@
#endif

#ifdef DEBUG
/proc/auxtools_stack_trace(msg)
CRASH(msg)

/proc/enable_debugging(mode, port)
CRASH("auxtools not loaded")

/world/proc/enable_debugger()
var/dll = world.GetConfig("env", "EXTOOLS_DLL")
if (dll)
call(dll, "debug_initialize")()
var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
if (debug_server)
call(debug_server, "auxtools_init")()
enable_debugging()

/world/proc/disable_debugger()
var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
if (debug_server)
call(debug_server, "auxtools_shutdown")()
#endif
4 changes: 4 additions & 0 deletions code/game/world.dm
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ var/shutdown_processed = FALSE
..()

/world/Del()
#ifdef DEBUG
disable_debugger()
#endif

if(!shutdown_processed) //if SIGTERM signal, not restart/reboot
PreShutdown("Graceful shutdown")
round_log("Graceful shutdown")
Expand Down

0 comments on commit 9684a4a

Please sign in to comment.