Debugging items


When debugging in game maker I needed to place a break point. These can be seen below:

Then I clicked the debug button to launch the debug preview. The debug button is the little bug (hence de-bug)

In this case, my code will stop running once a player makes contact with objCoin. From there the game will pause and I can step through the program.

 

The keys available are in order, continue, pause, restart, stop, step in, step over, step out and the X is end debugging session. 

Continue, pause, restart and stop are quite self explanatory, however step into means the debugging will step INTO the function, eg for each line in the function. Step over means it wont go into to a function but to the next line code, so it could skip an if statement but continue in the current function. Step out means it will step out of the current function and into the next line of code after it.

I can also make debug messages get shown in the console with this line of code.



By James Harrison, 14 June, 2018, 15:44