Garry's Mod

Garry's Mod

View Stats:
Dѻѻm Mar 7, 2018 @ 8:17pm
How do I obtain error logs/get diagnostic information for gmod problems?
[Edit: I do not mind people's "necroing" this thread with relevant comments.]

Where are error logs stored in gmod's file system. I didn't find much in there. Do I need a command to enable logging?

Is there a way to log the console?
Would be nice to be able to tell someone whose game crashes how to obtain whatever was in the console before the crash.

Using "log on" didn't log much.
Condump doesn't work now.

(Edit: Solution to that part:
Put into the Launch Options: -condebug
The file produced is called console.log
In GarrysMod/garrysmod)

(Launch Options is found by right clicking Garry's Mod, properties, click the Set Launch Options button. Then start gmod, or restart if gmod was already open.)


How do I get info besides what is in the console?


Are there error logs related to game crashes somewhere else in the Steam folder? Do I need to enable them?


(Edit: Partial solution to that:

https://wiki.garrysmod.com/page/Crash_Reporting

"Windows

You can find crashlogs in your game folder. ( Usually Steam/steamapps/common/GarrysMod/ ) They end with ".mdmp". These contain information we can use to work out why you have crashed.

OSX

When you crash on OSX we will need to see your stack trace. You can get this when it crashes by clicking on "send report", then on "details". We need you to copy and paste everything from the white text box.")

So now my question is, where are the crash logs on linux?


How do I obtain error logs, in Gmod, and in Steam. How do I get detailed information about problems? I need to know how to get the most info to be able to diagnose problems.

EDIT:
(And edited again because I think "echo" needs to be in front of the commands):

I've since learned about this trick. Put this in the game's launch options. It will send terminal output to a file.
(You get to a game's launch options by right clicking it in the library, properties, general and putting this in the Launch Options box.

echo %command% 2>&1 >/home/username/output.txt

Obviously adapt the filepath the file goes to to your own system and where you want it to go.

(noting the 2>&1 might be irrelevant, because,
echo %command% >/home/username/output.txt
printed the same info to me when I tried this with a game just now. But this game gave hardly any information to me in the file it made. I can't remember if
%command% 2>&1 >/home/username/output.txt
might on other games actually produce results, and more.




other variations:

(to use -condebug or other commands with this)
echo %command% -condebug 2>&1 >/home/username/output.txt

Note that a single ">" overwrites a file, a ">>" appends to a file

(alternative to append rather than overwrite)
echo %command% 2>&1 >>/home/username/output.txt
Last edited by Dѻѻm; May 31, 2022 @ 5:40pm
< >
Showing 1-15 of 15 comments
austinthehotty Mar 8, 2018 @ 12:08pm 
you type something in the console. Forgot what though
Not sure if this works for the game itself, however I usually put "-debug" in the startup line for my multiple SRCDS servers when things are going to sh*t. Perhaps you could give that a try? Just put it in the launch params for gmod in the steam client. Should spew the entire console into a text file in the game directory.
Dѻѻm Mar 8, 2018 @ 6:25pm 
Originally posted by ŦHË ǤÄMËⱤ ǤŮƔ:
Not sure if this works for the game itself, however I usually put "-debug" in the startup line for my multiple SRCDS servers when things are going to sh*t. Perhaps you could give that a try? Just put it in the launch params for gmod in the steam client. Should spew the entire console into a text file in the game directory.

Thanks. Tried that. Went into a single player save and intentionally caused errors. Just did some stuff to make some log content. Exited Gmod. [Edited to correct spelling. Exited, not existed.]

What is the name of the text file that is produced? I don't see anything that looks like it in /garrymod nor GarrysMod/garrysmod, nor specifically in GarrysMod/garrysmod/logs
Last edited by Dѻѻm; Jul 9, 2019 @ 10:45am
should just be called debug.txt. in the folder with hl2.exe.
Dѻѻm Mar 8, 2018 @ 10:31pm 
Originally posted by ŦHË ǤÄMËⱤ ǤŮƔ:
should just be called debug.txt. in the folder with hl2.exe.


Ah HA! The command to put into launch options is actually -condebug
The file produced is called console.log
In GarrysMod/garrysmod

Thanks for getting me thinking of puting some debug command in launch options. This will be super helpful!

Anyone else know any other tricks for getting stuff like crash information?
Last edited by Dѻѻm; Mar 8, 2018 @ 10:33pm
austinthehotty Mar 8, 2018 @ 10:47pm 
Originally posted by Engie:
Originally posted by ŦHË ǤÄMËⱤ ǤŮƔ:
should just be called debug.txt. in the folder with hl2.exe.


Ah HA! The command to put into launch options is actually -condebug
The file produced is called console.log
In GarrysMod/garrysmod

Thanks for getting me thinking of puting some debug command in launch options. This will be super helpful!

Anyone else know any other tricks for getting stuff like crash information?
If the game crashes, it automatically makes a log...even without these commands.
Dѻѻm Mar 8, 2018 @ 10:58pm 
Originally posted by austinthehotty:
Originally posted by Engie:


Ah HA! The command to put into launch options is actually -condebug
The file produced is called console.log
In GarrysMod/garrysmod

Thanks for getting me thinking of puting some debug command in launch options. This will be super helpful!

Anyone else know any other tricks for getting stuff like crash information?
If the game crashes, it automatically makes a log...even without these commands.


What is the file called and what is the file path? Cause I see nothing.
austinthehotty Mar 8, 2018 @ 11:17pm 
common/GarrysMod
Dѻѻm Mar 8, 2018 @ 11:24pm 
Originally posted by austinthehotty:
common/GarrysMod

I have no crash logs in there, yet my game has crashed many times in the last few weeks.

What is the file itself called?
austinthehotty Mar 8, 2018 @ 11:51pm 
Originally posted by Engie:
Originally posted by austinthehotty:
common/GarrysMod

I have no crash logs in there, yet my game has crashed many times in the last few weeks.

What is the file itself called?
Mine is "hl2_180226_crash_2018_3_7T22_15_4C0.mdmp"
Dѻѻm Mar 9, 2018 @ 12:05am 
Originally posted by austinthehotty:
Originally posted by Engie:

I have no crash logs in there, yet my game has crashed many times in the last few weeks.

What is the file itself called?
Mine is "hl2_180226_crash_2018_3_7T22_15_4C0.mdmp"


Huh, I don't have that. I don't know why I don't have that, possibly because I am on Linux. At least I know Windows users have access to mdmp files.


I found at https://wiki.garrysmod.com/page/Crash_Reporting :

"Windows

You can find crashlogs in your game folder. ( Usually Steam/steamapps/common/GarrysMod/ ) They end with ".mdmp". These contain information we can use to work out why you have crashed.

OSX

When you crash on OSX we will need to see your stack trace. You can get this when it crashes by clicking on "send report", then on "details". We need you to copy and paste everything from the white text box."

So now my question is, where are the crash logs on linux?
The Corinthian Jul 8, 2019 @ 8:27pm 
Did you ever find the solution?
Dѻѻm Jul 9, 2019 @ 10:36am 
Originally posted by The Corinthian:
Did you ever find the solution?

I believe I need to start the game in console and then see the output. I get error when trying to do this, probably need to start with sudo, but want to ask someone security aware if starting a game with root privileges is secure or not, before trying that. I've tried starting Steam with strace to get a stack trace, but that seems to just track steam and not the games run under it. Someone said I may need to find a launch option (I assume to put in the game's launch option via right clicking the game, properties, and using the button there) to create a stack trace for the game, but this is hearsay until I find if there actually is such a launch option. Probably I am going to make a post on Steam for Linux asking how to get a proper stack trace and/or crash log, when I have time. Do you need to know this immediately?

If you need this for Mac or Windows, I did find that and its in the post, in case you overlooked it.
Last edited by Dѻѻm; Jul 9, 2019 @ 10:41am
t1tan1c3 Nov 21, 2021 @ 5:37am 
So... gmod tries to start on Ubuntu 21.10, but then fails. I'm wanting to get clues about the problem from a log somewhere. Where is the log for gmod on Linux?
Dѻѻm Nov 21, 2021 @ 3:35pm 
Originally posted by t1tan1c3:
So... gmod tries to start on Ubuntu 21.10, but then fails. I'm wanting to get clues about the problem from a log somewhere. Where is the log for gmod on Linux?


I forgot I made this thread.

I edited my post above with something I've learned since.
Last edited by Dѻѻm; May 31, 2022 @ 5:25pm
< >
Showing 1-15 of 15 comments
Per page: 1530 50

Date Posted: Mar 7, 2018 @ 8:17pm
Posts: 15