<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<script type="text/javascript" language="JavaScript">
function reDo() {
if (innerWidth != origWidth || innerHeight != origHeight)
location.reload();
}
if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
origWidth = innerWidth;
origHeight = innerHeight;
onresize = reDo;
}
onerror = null;
</script>
<style type="text/css">
< !-- div.WebHelpPopupMenu {
position: absolute;
left: 0px;
top: 0px;
z-index: 4;
visibility: hidden;
}
p.WebHelpNavBar {
text-align: right;
}
-->
</style>
<script type="text/javascript">
gRootRelPath = "../../..";
gCommonRootRelPath = "../../..";
gTopicId = "9.2.20";
<script type="text/javascript" src="../../../template/scripts/rh.min.js"></script>
<script type="text/javascript" src="../../../template/scripts/common.min.js"></script>
<script type="text/javascript" src="../../../template/scripts/topic.min.js"></script>
<script type="text/javascript" src="../../../template/scripts/topicwidgets.min.js"></script>
<script type="text/javascript" src="../../../whxdata/projectsettings.js"></script>
<link rel="stylesheet" type="text/css" href="../../../template/styles/topic.min.css"/>
<link rel="stylesheet" type="text/css" href="../../../template/Charcoal_Grey/topicheader.css"/>
<meta name="topic-status" content="Draft"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Debugging</title>
<meta name="generator" content="Adobe RoboHelp 2019"/>
<link rel="stylesheet" href="../../../assets/css/default.css" type="text/css"/>
<meta name="rh-authors" content="Mark Alexander"/>
<meta name="topic-comment" content="Reference section for Debugging functions and variables"/>
<meta name="rh-index-keywords" content=""/>
<meta name="search-keywords" content="Debugging"/>
</head>
<body>
<div class="topic-header rh-hide" id="rh-topic-header" onclick="rh._.goToFullLayout()">
<div class="logo">
</div>
<div class="nav">
<div class="title" title="Debugging">
<span>Debugging</span>
</div>
<div class="gotohome" title="Click here to see this page in full context">
<span>Click here to see this page in full context</span>
</div>
</div>
</div>
<div class="topic-header-shadow rh-hide" id="rh-topic-header-shadow"></div>
<h1>Debugging</h1>
<p>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 2 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.</p>
<p class="note"><b>NOTE:</b> Although they may work on certain platforms they are not to be used for anything other than debugging.</p>
<p> </p>
<ul class="colour">
<li><a href="debug_mode.htm">debug_mode</a></li>
<li><a href="debug_event.htm">debug_event</a></li>
<li><a href="debug_get_callstack.htm">debug_get_callstack</a></li>
<li><a href="exception_unhandled_handler.htm">exception_unhandled_handler</a></li>
<li><a href="get_integer.htm">get_integer</a></li>
<li><a href="get_string.htm">get_string</a></li>
<li><a href="show_error.htm">show_error</a></li>
<li><a href="show_message.htm">show_message</a></li>
<li><a href="show_question.htm">show_question</a></li>
<li><a href="show_debug_message.htm">show_debug_message</a></li>
<li><a href="show_debug_overlay.htm">show_debug_overlay</a></li>
<li><a href="code_is_compiled.htm">code_is_compiled</a></li>
<li><a href="fps.htm">fps</a></li>
<li><a href="fps_real.htm">fps_real</a></li>
</ul>
<p> </p>
<p>Apart from those specialist functions, to help you out when creating your game, GameMaker Studio 2 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:</p>
<p> </p>
<ul class="colour">
<li><a href="../../../Additional_Information/Errors/Syntax_Errors.htm">Syntax Errors</a></li>
<li><a href="../../../Additional_Information/Errors/Compiler_Errors.htm">Compiler Errors</a></li>
<li><a href="../../../Additional_Information/Errors/Runner_Errors.htm">Runner Errors</a></li>
</ul>
<p> </p>
<p>You can also find further information on how to debug your game in the section on <a href="../../../IDE_Tools/The_Debugger.htm">The Debugger</a>.</p>
<p> </p>
<p> </p>
<p> </p>
<div class="footer">
<div class="buttons">
<div class="clear">
<div style="float:left">Back: <a href="../GML_Reference.htm">GML Reference</a></div>
<div style="float:right">Next: <a href="../Garbage_Collection/Garbage_Collection.htm">Garbage Collection</a></div>
</div>
</div>
<h5>© Copyright YoYo Games Ltd. 2020 All Rights Reserved</h5>
</div>
</body></html>