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:
- "OutputDebugOn" - This enables a call to OutputDebugString for the Windows target, which means that all debug output - everything you see in the Output window - can be viewed by Visual Studio or by 3rd party apps.
- "BreakOnError" - This option is for Windows YYC builds only, and means that projects will not display the usual code error screen if the runtime detects an error, but instead just carry on and crash. This allows you to see the stacktrace within Visual Studio if debugging.
|string||The custom debug event string to use.|
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.