samspade
Member
The debugger is one of the few places that I still have unexpected results in 2.3. I have the following code with a breakpoint on the very first line. It stops just fine, however when it does, all of the functions are already declared. That isn't super confusing but what is confusing is that if I click go to next line, the next is the first line of the struct. I ran it several times with the exact same results every time. It skips past all the function calls, in fact, it runs the function calls before it pauses for the breakpoint (i.e. by the time the game stops at the breakpoint, the debugger has already printed the messages).
This doesn't seem right. Am I missing something?
Code:
This doesn't seem right. Am I missing something?
Code:
GML:
//creating method variables BREAKPOINT
say_hello = function() {
show_debug_message("Hello World");
}
say_something = function(_msg) {
show_debug_message(_msg);
}
say_goodbye = function() {
show_debug_message("Goodbye");
}
say_hello();
say_something("How are you?");
say_goodbye();
//structs
struct_of_stuff = {
num : 124,
str : "Hello World",
my_function : function() {
show_debug_message("Wow!");
}
}