ARDebug

From Blue Mars Developer Guidebook

Jump to: navigation, search
There are security restrictions on this article

This is an Avatar Reality Utilities function.

Function

ARDebug(level)
convenience function for setting debugging level.

Usage

level is a number from 0-4, used to set the logging verbosity level. Anything over 0 sets the Lua debugger to activate on errors or breakpoints

Typically, this function is placed in an entity OnInit callback so debugging of the script can be easily switch on or off.

Code

This function just sets two or three console variables using System.SetCVar. See Console/Log

function ARDebug(level)
	if (level>0) then
		-- bring up lua debugger for errors and breakpoints
		System.SetCVar("lua_debugger",1);
	end
	System.SetCVar("log_Verbosity",level);
	System.SetCVar("log_FileVerbosity",level);
end
Problems with this wiki page? Contact us either by: Support Email or Support Ticket System

Blue Mars Guidebook Privacy Policy
Blue Mars Guidebook Community Guidelines

Personal tools