Debug.Print("Help button clicked");
Prints "Help button clicked" to the debug window. (You could put this action in the "On Help" event for a Help button to find out if the event's actions are being performed.)
Debug.Print("On Next event fired: " .. Debug.GetEventContext());
Prints a debug message consisting of the string "On Next event fired: " followed by the current event context.
-- Show the debug window.
-- Turn on the debug trace mode.
-- Print some example text to the debug window.
Debug.Print("This is a test line that will be printed.\r\n");
-- Perform some addition and write it out to the debug window.
total = 6 + 2;
-- Print the current date to the debug window.
-- Get the event context and print it to the debug window.
context = Debug.GetEventContext();
-- Determine if trace mode is turned on and print the result to the debug window.
trace_mode = Debug.GetTraceMode();
if trace_mode then
Debug.Print("Trace mode is on.\r\n");
Debug.Print("Trace mode is off.\r\n");
This example uses a few of the debug actions to output content to the debug window.
See also: Related Actions