debug_event


Description

This function generates a custom debug event that will be shown in the Graph View of the debugger when a game is being run in Debug Mode. If you require messages to be displayed when not in debug mode, then you should be using show_debug_message(). It is worth noting that the function will also take two reserved strings to help perform debugging using external applications like Visual Studio. These strings are:


Syntax:

debug_event(string)

Argument Description
string The custom debug event string to use.


Returns:

N/A


Example:

if !surface_exists(global.EffectsSurface)
   {
   debug_event("Recreating Effects Surface");
   global.EffectsSurface = surface_create(room_width, room_height);    }

The above code checks to see if an surface exists and if it does not, a debug event is triggered in the graph view of the debugger (the game must have been run in Debug Mode for this to be visible) and the surface is recreated.