Legacy GM Introduction to using the Debugger

GM Version: GMS1 1.4 and beta version of GMS2
Target Platform: Windows
Download: N/A
Links: N/A

Summary:
This video tutorial is a brief introduction to using the debugger. It goes over how to select and organize your panels, set breakpoints, observe variable values, and step through code. If you've been ignoring the debugger because it seemed too complicated, this tutorial is for you!

Tutorial:
 

Roderick

Member
I've been ignoring the debugger because if there is any documentation, I haven't seen it, so it was easier for me to just inject debugging code to track things. To tell the truth, I don't even know how to access the debugger!
/em hangs head in shame.

I'll definitely be taking a look at this later!
 

Roderick

Member
Ummm... the manual?
To be fair, there's a LOT of stuff in the maunual, far more than what I've actually read. It's kinda common for me to find out that (insert amazing thing here) exists through a third party, and only later find it in the manual.
 
Does this cover the various windows as well ?
It covers SOME of them. I would need to do a much longer video. But there is a great description of each of them in the manual. If you have questions about how to use a specific panel, feel free to ask here and I'll do my best to explain it.

To be fair, there's a LOT of stuff in the maunual, far more than what I've actually read. It's kinda common for me to find out that (insert amazing thing here) exists through a third party, and only later find it in the manual.
Yeah. As crazy as it sounds, you really should read through the ENTIRE MANUAL at least once. Yes, it sounds nuts... but game development is hard and time consuming already. It's worth the time investment just to know what's in the manual. You won't memorize it, obviously, but having a small entry in the back of your brain of what's in the manual can save you some serious headache in the future.
 
T

TheMatrixHasMe

Guest
It covers SOME of them. I would need to do a much longer video. But there is a great description of each of them in the manual. If you have questions about how to use a specific panel, feel free to ask here and I'll do my best to explain it.


Yeah. As crazy as it sounds, you really should read through the ENTIRE MANUAL at least once. Yes, it sounds nuts... but game development is hard and time consuming already. It's worth the time investment just to know what's in the manual. You won't memorize it, obviously, but having a small entry in the back of your brain of what's in the manual can save you some serious headache in the future.
Exactly this. The manual should be your Bible.
 
A

Ambition13z

Guest
GM Version: GMS1 1.4 and beta version of GMS2
Target Platform: Windows
Download: N/A
Links: N/A

Summary:
This video tutorial is a brief introduction to using the debugger. It goes over how to select and organize your panels, set breakpoints, observe variable values, and step through code. If you've been ignoring the debugger because it seemed too complicated, this tutorial is for you!

Tutorial:
You sir, have helped me quite a bit with this video alone. You also just earned yourself a new subscriber on YouTube!
 
M

mjadev

Guest
thanks a lot for this tutorial !
I'm a new comer to GMS2 and this tuto opened me the debugger, which is far from being intuitive from my point of view
I agree that there are a lot of info in the manual but a short video like this is much more efficient to discover the basics of some subjects.
 
I agree that there are a lot of info in the manual but a short video like this is much more efficient to discover the basics of some subjects.
Thanks! Yeah, this is really just getting your feet wet, but sometimes that's all it takes to get people who would maybe see the ocean and just turn around not wanting to deal with it to jump in and really having fun with it.
 
M

mdbussen

Guest
Great Video and a good introduction to the debugger. But I'm pretty sure that the best way to debug your scripts is to just insert a ton of show_debug_message prints :)

I would love to see a follow-up video on profiling and optimizing your game using the debugger as that is probably a fairly common use case.
 
I would love to see a follow-up video on profiling and optimizing your game using the debugger as that is probably a fairly common use case.
Yeah, I think one for examining surfaces/texture pages and performance would be useful. It's on the list... the list is getting a bit overwhelming...

Glad you found it useful, though. And, hey, nothin' wrong with a bunch of show_debug_messages. I actually wrote my own debug log script:
Code:
/// logf(text, args...)
var text = argument[0];

for(var i = 1;i < argument_count;i ++) {
    text = string_replace(text, "%"+string(i), string(argument[i]));
}

show_debug_message(text);
You can use it like this:

Code:
logf("Player's Position: %1,%2",x,y);
And you'll get: "Player's Position: 25,42.12" in your output window. Very handy.
 
K

Kuro

Guest
Great Video and a good introduction to the debugger. But I'm pretty sure that the best way to debug your scripts is to just insert a ton of show_debug_message prints :)

I would love to see a follow-up video on profiling and optimizing your game using the debugger as that is probably a fairly common use case.
Totally agree that debug messages are the best thing since sliced toast. I don't like GM:S 2's built in console though, so like Pixelated Pope I wrote a script that outputs them to a debug log file instead. I found a windows program called tail that can display log files and auto updates when they change. While searching for it I read that notepad++ also has that feature.
 
Last edited by a moderator:
Y

YunaKozue

Guest
Thank you so much!! I was super stuck for a week cause I couldn't get the source tab back, so this really helped me X'D
 
Top