Debugging

While making a game, it is often very important that you know certain details of the game mechanics at specific points in time, or to be able to input certain key values for some functions to test out different methods and ideas for your game.

GameMaker provides the following functionality for this: 

NOTE Although they may work on certain platforms they are not to be used for anything other than debugging.

NOTE You can find further information on how to debug your game in the section on The Debugger.

Debug Functions (Basic)

The following functions offer basic functionality to debug your game: 

The Debug Overlay

GameMaker also has more advanced functionality for debugging that is accessible from The Debug Overlay.

Debug Macros

GameMaker also has a couple of built-in macros that you can use to make it easier to debug your game: 

The debug output will be the following in case of the above screenshot:

gml_GlobalScript_Macros
3
show_macros
gml_GlobalScript_Macros
10
gml_GlobalScript_Macros

Errors

Apart from those specialist functions and macros, to help you out when creating your game, GameMaker also has a long list of error messages that can be shown either when writing your game code, compiling your game, or when the game itself is running. These messages point to the specific error in question and can be used to pinpoint a problem within a specific object or script function, helping greatly with the process of debugging your game. However, it may not always be obvious exactly what the error message means and so the following sections list all of the possible messages and explain what they mean to make life easier for you: