When in Debug?

Is there a way to know when I am debugging vs. running a build of an project?

I have a gDebug variable that is set to True when I am working within the IDE, programming, testing, etc. I manually have to set that to False when I build the application or I get funky happenings. Is there an IDE or system variable I can check to see if the app is running via the debugger or actual build? That way I could set the gDebug dynamically.


Use the DebugBuild constant.

Perfect, Thanx!