Barotrauma

Barotrauma

Not enough ratings
How to copy error messages - save debug console to a log file
By Dan Murphy Jr.
How to save error messages for debugging mods and strange hardware issues.
   
Award
Favorite
Favorited
Unfavorite
Errors in console


When Barotrauma encounters an error, the debug console pops up with a message in red text. This happens frequently when you are making and testing a mod. Hardware failure and software bugs may also produce error messages. If many errors occur simultaneously, it can be difficult to read them all. Here is how you can save a log of the debug console to a text file.

Step 1: Reopen the debug console
The console should be open already. You know, it pops up and annoyingly takes control of keyboard input. This has caused many Europan deaths. 💀.
If you already closed the console, press F3 to reopen it. No big deal.

Step 2: Use 'dumptofile' command
'dumptofile' will create a text file with everything that has been printed to the console since the game was started. The default filename is 'consoleOutput.txt', but you can specify an alternative filename by typing it after the command e.g. 'dumptofile error.txt'.

Step 3: Read the console file
The file created by 'dumptofile' will be located in the Barotrauma install folder. By default, this will be located at
C:\Program Files (x86)\Steam\steamapps\common\Barotrauma

If you installed your steam library games on another hard drive, then it will not be in 'Program Files' on the 'C:' drive.
Note that the color of console messages is not preserved, there is no yellow or red text.

Note: If an error popped up and the game crashed before you had time to use the 'dumptofile' command, Barotrauma will try to generate a crash log that will include the console output and any error messages. The file will named 'crashreport.log', and can be found in the Barotrauma install folder, just like a console file.

I find this to be the most useful console command for making simple mods, but if you need a little more help, check out the Barotrauma wiki.

https://barotraumagame.com/wiki/Console_Commands