Move debug_* functions to game object and out of common