You will learn about some of GameMaker's debugging capabilities. Before that, we'd like to show you a lightweight debugger console that you can modify and add to any game project to help with the debugging process. We've used it before, and it has been very helpful. Find it at http://gmc.yoyogames.com/index.php?showtopic=675236.
As for regular debugging, GameMaker: Studio has four features for debugging:
Compile-time errors
Runtime errors
Debugger module
Debugging functions
Compile-time errors are probably the easiest to fix, since they directly tell you what the issue is. Runtime errors still tell you the issue, but the runner is unable to know exactly what is causing the issue. Furthermore, a runtime error might not always occur, so you'll have to test your game many different times with many different conditions in order to eliminate all the bugs that you can. As far as the debugger, it's rather similar to any other debugger for a compiled program; it just has some GameMaker specific...