This is the source code of an included piece of LSL that I use frequently. It implements a simple function that sends an arbitrary string of text to the owner of the object for debugging purposes.
If you don’t use (or want to use) the Firestorm preprocessor, copy the code between the hash directives and replace the #include that led you to this page with the code you find here (that’s essentially what the preprocessor does for you automatically).
#ifndef __DEBUG_LSL #define __DEBUG_LSL #ifdef DEBUG debug (string text) { llOwnerSay (text); } #else #define debug(dummy) #endif #endif // __DEBUG_LSL