Skip to content

Instantly share code, notes, and snippets.

@tinkerer-red
Created October 12, 2023 16:06
Show Gist options
  • Save tinkerer-red/388b323a9bd43a8555c8322cdf0f7187 to your computer and use it in GitHub Desktop.
Save tinkerer-red/388b323a9bd43a8555c8322cdf0f7187 to your computer and use it in GitHub Desktop.
GML implementation of `trace`
#macro trace __trace(_GMFILE_+"/"+_GMFUNCTION_+":"+string(_GMLINE_)+": ")
function __trace(_location) {
static __struct = {};
__struct.__location = _location;
return method(__struct, function(_str){
show_debug_message(__location + ": " + string(_str));
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment