Closed TelepathicGrunt closed 3 weeks ago
Great idea 👍 Would it be possible to create a testmod with a way to trigger this for testing?
testmod added. Command is /print_thread_dump_test_command
. Will work in single player or on server as it calls the DedicatedServerWatchdog.createCrashReport method directly to get the string to print.
Turns out 1.21.2 broke my FullStack Watchdog mod but instead of merging someone's PR to port my mod to that version, I figured maybe it'll be better to have it in Fabric API itself.
This code simply swaps the ThreadInfo being passed to StringBuilder with a full stacktrace string instead. The reason for this is ThreadInfo's toString method will truncate the stacktrace for itself. We need the full dump in order to see problems so doing our own copy of that toString method but without the truncating should do the trick