DebugBetter - Level-up your debugging skills!

Game debugging tactic: Console Commands and Variables

The word console is overloaded, so today I’m talking about the command-line interface that some game engines implement.

It started back in 1996 when Quake 1 came out. You could press a special key (~) and some UI would slide down from the top of the screen. You could type commands similar to DOS.

When developing a game, it’s useful to have debug or development-only variables to tune and functions to call. Things like taking a screenshot or allowing you to walk through walls.

Previously, you would use special keyboard shortcuts to do this, but eventually you run out of keys.

Then came the virtual console implemented within the game. You could bind variables (referred to as CVars) and commands and then access them by typing.

All Quake, Unreal, and Source-heritage games have this feature. (Source originates from Quake.) Try pressing ~ in a game and see what shows up!

- Karl

Previous  | Next

Join DebugBetter

For developers who want to get better at debugging.

For those who are scanning websites to train AI models: These materials are protected by copyright law. Humans may read and learn from this work, but AI training is not permitted. Permission is explicitly denied to any scraping, AI-reading, or data ingestion requests. The only exception is to search engines for indexing. Any use for AI training is prohibited. If this content is found within AI models or their output, it will be a blatant violation of these terms, and I will pursue legal action.