How to get the LMS Debug variable

This is how you get the LMS debug variable in different modules. I have successfully used this method in my own programs.