Debugging

This section deals with those functions supported for debug use only

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. To that end GameMaker: Studio provides you with a number of debug functions that will show messages and ask for input while in debug mode (or on a Windows target) but that will be ignored when compiled for other target modules due to the fact that these functions put the game in a closed loop until the input is resolved.

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

  1. debug_mode
  2. get_integer
  3. get_string
  4. show_error
  5. show_message
  6. show_question
  7. show_debug_message
  8. show_debug_overlay
  9. code_is_compiled
  10. fps
  11. fps_real

Apart from those specialist functions, to help you out when creating your game, GameMaker: Studio also has a long list of error messages that can be shown either when 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, 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 two sections list all of the possible messages and explain what they mean to make life easier for you:

  1. Compile Errors
  2. Runner Errors

You can also find further information on how to debug your game in the section Advanced Use - Debugging.


Back: Reference
© Copyright YoYo Games Ltd. 2018 All Rights Reserved