Debugging server crashing on Garry’s Mod

November 27, 2019

By default we only store the latest runtime console log to avoid customers running up disk space without realising. However sometimes you want to keep your console logs to debug crashes etc.

First, you’ll want to enable the debug flag in the startup parameters:

Don’t confuse this with the “condebug” option, which is something different.

When your server crashes it’ll generate the debug.log, and core dump file in your servers root directory:

Finally you’ll want to head over to the mod manager & install the historic logs we’ve added, to start saving your consoles output logs:

Note this will replace your srcds_run file, if you have changes, you’ll want to re-add them! Your old srcds_run will be moved to srcds_run_original. Uninstalling this mod will move it back (or restore the default srcds_run if you deleted srcds_run_original)

Once you’ve done this, the logs will be timestamped with a prefix noting if it was a restart or a crash:

Note: This doesn’t require you to enable condebug, as it utilises our console wrapper. The advantage to this is that condebug (the garrysmod/console.log) doesn’t log everything, especially during a crash.