Skip to content

Logging, debugging, and linting

Matthew edited this page Dec 5, 2018 · 1 revision

Factorio logs all errors by default to factorio-current.log in your factorio user data folder. So while logging can be beneficial in some cases, the norm is that logging is not necessary.

The RedMew scenario has built-in error handling. This means when errors arise the game will not crash, but also that errors can be missed if the logs are not checked. To disable error catching and have the game crash and/or to enable printing to the console on errors, set _DEBUG to true in config.lua.

Sadly, there is no current robust way to automatically test scenario code in Factorio, nor debug it. However linting can help, and for that we use luacheck and a custom luacheckrc which adapted from the amazing work by Nexela.

Clone this wiki locally