Debug.Clear

Debug.Clear (

)

Example 1

Debug.Clear();

Clears the contents of the debug window.

Example 2

-- Show the debug window.
Debug.ShowWindow(true);

-- 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;
Debug.Print("6 + 2 = "..total.."\r\n");

-- Ask if the debug window should be cleared.
result = Dialog.Message("Question", "Do you want to clear the debug window?", MB_YESNO, MB_ICONINFORMATION, MB_DEFBUTTON1);

-- If the user clicks the Yes button, clear the debug window.
-- If the user clicks the No button, leave it.
if result == IDYES then
    Debug.Clear();
end

Outputs some text to the debug window and asks if the window should be cleared using a Dialog.Message action. If they click yes, the debug window will be cleared. If they click no, no action will be taken.

See also:  Related Actions