Debugging (Civ5)
From Civilization Modding Wiki
This article is under construction, come back in a few days.
Checklist
- Did you correctly import to the VFS the files that need to be?
- Did you correctly set up the actions and content tab in your project?
- Did you restart civ5 after you added new files?
XML Debugging

Checking the logs
Whenever you start a game, Civ5 saves some logs under My Games/Sid Medier's Civilization V/cache/Civ5DebugDatabase.db.
- If there were errors with the XML formatting of your data files (wrong column names for example), they will logged in XML.log.
[6904.323] Tag (TXT_KEYMODDING_SHOWDLCMODS) does not start with 'TXT_KEY_'
- If there were errors with the data integrity (missing foreign keys for example - types that reference rows from other tables), they will logged in database.log.
[6903.917] Invalid Reference on Leader_Flavors.LeaderType - "LEADER_HARALD" does not exist in Leaders
Using the snapshots
Whenever you start a game, Civ5 saves a snapshot of the database under My Games/Sid Medier's Civilization V/cache/Civ5DebugDatabase.db
- This allows you to check how your XML and SQL files have been merged with the standard game data.
Lua Debugging
Using the Firetuner console
Print, assert and error
Coroutines stack traces
Handling errors for the end-user
Troubleshooting
Game inspectors
Quick bug reproduction
Configuration
Look for the following files under My Documents/My Games/Sid Meiers' Civilization V and open them in a text editor like the notepad (not in a word processor).
- config.ini
- Set
LoggingEnabledto 1. Civ5 will write log files under theLogsfolder. - Set
EnableLuaDebugLibraryto 1. Civ5 will display stack traces on Lua errors and you will be able to use the debug object. - Set
DebugPanelto 1. By pressing the ² key (may be ù or something else depending on your computer's language) during a game, Civ5 will display a debug panel.
- Set
- usersettings.ini
- Set
DebugModeto 1. Needed to enable other features previously mentioned.
- Set