[Guide] Where to find logs and debugging info - cortex-command-community/Cortex-Command-Community-Project GitHub Wiki

The game generates some logs in the form of LogLoading.txt and LogConsole.txt which can be found where mods are located (the folder where the program is run from, or .local/share/Cortex Command if you are running an installed linux build). Those are highly useful for finding problems but only so long as the game exits normally. In case the game crashes somehow, these will not contain most of the important information. Below are guides to getting as much information as possible after a crash.

Generally if you are testing the game, always run a debug build on the latest version of the development branch (data and source) and run the game in a console window (details for that below).

Windows

To run the game with console output, open a command prompt in the folder the game is located (by shift-right click and selecting open console here) and type in ./CortexCommand.exe -cout

[TODO]


Linux

To run the game in a terminal, open a terminal and run:

  • CortexCommand -cout if you installed the game or
  • ./CortexCommand.x86_64 -cout if you are running directly from the data folder.

Should the game crash

In case the game crashes you may want to file a bug report (if it is something new, if it seems like a random crash ask on discord). Please attach the following:

  • LogConsole.txt (only if it contains anything)

  • LogLoading.txt (only if it exists and contains anything)

  • The stacktrace. This contains a lot of useful information (only when running a debug build). To obtain do:

    • If coredumpctl exists

      • Run coredumpctl list and find the youngest entry for Cortex Command. If it says missing under COREFILE, you can stop here.
      • Copy the PID of the entry. (Select it and use the middle mouse button to paste)
      • if you have gdb installed: coredumpctl -q debug [PID] -A "-ex 'bt full' --batch" > [filename] to generate the stacktrace which contains most of the useful information.
    • Otherwise:

      • check ulimit -c , if 0 set to unlimited by ulimit -c unlimited
      • corefiles should be dumped in the working directory, usually named core
      • get stacktrace by gdb [CortexCommand] core
    • Or send the (compressed) corefiles on discord