![]() |
Debug.Log Extensions
Documentation (1.1.9)
|
Utility class containing Debugging methods similar to the Debug class, with the exception that all calls to its methods — including any calls made in their arguments — are completely omitted in release builds.
Static Public Member Functions | |
static void | Log ([CanBeNull]object message, Object context=null) |
Logs a message to the console. More... | |
static void | Log ([CanBeNull]string message, Object context=null) |
Logs a message to the console. More... | |
static void | Log (int channel, [CanBeNull]string message, Object context=null) |
Logs a message to the console on the given channel . More... | |
static void | Log (int channel1, int channel2, [CanBeNull]string message, Object context=null) |
Logs a message to the console using the given channel. More... | |
static void | Log (int channel, [CanBeNull] object message, Object context=null) |
Logs a message to the console using the given channel. More... | |
static void | Log (int channel1, int channel2, [CanBeNull]object message, Object context=null) |
Logs a message to the console using the given channel. More... | |
static void | Log ([NotNull]Expression< Func< object >> classMember, Object context=null) |
Logs to the Console the name and value of classMember a class member. More... | |
static void | Log ([NotNull]string prefix, [NotNull]params Expression< Func< object >>[] classMembers) |
Logs a message to the Console consisting of a prefix text string followed by the names and values of classMembers zero or more class members. More... | |
static void | Log (params string[] messageParts) |
Logs a message to the Console formed by joining the given text strings together. More... | |
static void | Log (object arg1, object arg2, params object[] args) |
Logs a message to the Console listing a number of elements separated by a separator character. More... | |
static void | LogWarning (int channel, [CanBeNull]string message, Object context=null) |
Logs a warning message to the console using the given channel. More... | |
static void | LogWarning (params string[] messageParts) |
Logs a warning to the Console formed by joining the given text strings together. More... | |
static void | LogWarning (string messagePart1, string messagePart2, params string[] messageParts) |
Logs a warning to the Console formed by joining the given text strings together. More... | |
static void | LogWarning (object arg1, object arg2, params object[] args) |
Logs a warning to the Console listing a number of elements separated by a separator character. More... | |
static void | LogError ([NotNull]string prefix, [NotNull]params Expression< Func< object >>[] classMembers) |
Logs an error message to the Console consisting of the name and value of one or more class members separated by a separator character. More... | |
static void | LogError (int channel, [CanBeNull]string message, Object context=null) |
Logs an error message to the console using the given channel. More... | |
static void | LogError (params string[] messageParts) |
Logs an error to the Console formed by joining the given text strings together. More... | |
static void | LogError (string messagePart1, string messagePart2, params string[] messageParts) |
Logs an error to the Console formed by joining the given text strings together. More... | |
static void | LogError (object arg1, object arg2, params object[] args) |
Logs an error to the Console listing a number of elements separated by a separator character. More... | |
static void | LogError ([CanBeNull]object message, Object context=null) |
Logs an error message to the Console. More... | |
static void | LogError ([CanBeNull]string message, Object context=null) |
Logs an error message to the Console. More... | |
static void | LogError ([NotNull]Expression< Func< object >> classMember, Object context=null) |
Logs a warning message to the Console consisting of the name and value of classMember a class member. More... | |
static void | LogException (Exception exception) |
Logs an exception to the Console. More... | |
static void | LogFormat< LogOption > (LogType logType, LogOption logOptions, Object context, string format, params object[] args) |
Logs a message to the Console formed by inserting the values of args zero or more objects into a format text string. More... | |
static void | LogIf (bool condition, string message, Object context=null) |
If condition is true logs a message to the console. More... | |
static void | LogIf (bool condition, int channel, string message, Object context=null) |
If condition is true logs to the Console on the given channel a message . More... | |
static void | LogIf (bool condition, int channel, [NotNull] Expression< Func< object >> classMember, Object context=null) |
If condition is true logs to the Console on the given channel the name and value of classMember a class member. More... | |
static bool | Ensure (bool condition, Object context=null) |
If condition is false logs to the Console an error message and returns false . More... | |
static bool | Ensure (bool condition, string message, Object context=null) |
If condition is false logs to the Console an error message and returns false . More... | |
static bool | Ensure (bool condition, int channel, Object context=null) |
If condition is false logs to the Console on the given channel an error message and returns false . More... | |
static bool | Guard (bool condition, Object context=null) |
If condition is false logs to the Console an error message and returns true . More... | |
static bool | Guard (bool condition, int channel, Object context=null) |
If condition is false logs to the Console on the given channel an error message and returns true . More... | |
static void | Guard< TException > (bool condition, params object[] exceptionArguments) |
If condition is false throws an exception of type TException . More... | |
static void | LogState ([CanBeNull]object target, BindingFlags flags=DefaultInstanceBindingFlags) |
Logs to the Console the name and value of every field and property of target matched using the specified flags . More... | |
static void | LogState ([CanBeNull]object target, bool includePrivate, bool includeStatic=false) |
Logs to the Console the name and value of every field and property of target matched using the specified settings. More... | |
static void | LogState ([NotNull]Type classType, BindingFlags flags=DefaultStaticBindingFlags) |
Logs to the Console the name and value of every static field and property of classType matched using the specified flags . More... | |
static void | LogChanges (Expression< Func< object >> classMember, bool pauseOnChanged=false) |
Logs to the Console the name and value of classMember any time its value is changed. More... | |
static void | DisplayButton ([NotNull]Expression< Action > onClicked) |
Start displaying a button on screen which calls a method when clicked. More... | |
static void | DisplayButton ([NotNull]string label, [NotNull]Action onClicked) |
Start displaying a button on screen which calls a method when clicked. More... | |
static void | CancelDisplayButton ([NotNull]Expression< Action > onClicked) |
Stop displaying a button on screen. More... | |
static void | CancelDisplayButton ([NotNull]string label) |
Stop displaying a button on screen. More... | |
static void | StartStopwatch () |
Starts a new stopwatch counting upwards from zero with the given label. More... | |
static void | StartStopwatch ([NotNull]string name) |
Starts a new stopwatch counting upwards from zero with the given name. More... | |
static void | StartSubStopwatch ([NotNull]string name) |
Starts a new sub-stopwatch running under the stopwatch that was last started using StartStopwatch. More... | |
static void | StartSubStopwatch ([NotNull]string parentName, [NotNull]string name) |
Starts a new sub-stopwatch running under a parent stopwatch. If main stopwatch by provided name does not exist yet one will be created. More... | |
static void | FinishSubStopwatch () |
Gets the last started stopwatch and finishes the sub-stopwatch inside it which was last started, still leaving the main stopwatch running. More... | |
static void | FinishSubStopwatch ([NotNull]string mainStopwatchName) |
Finishes a previously created sub-stopwatch, still leaving the main stopwatch running. Results are not logged at this point, only when you finish the main stopwatch. More... | |
static void | FinishStopwatch () |
Logs results of a previously created stopwatch and then clears it. | |
static void | FinishStopwatch ([NotNull]string stopwatchName) |
Logs results of a previously created stopwatch and then clears it. | |
static void | FinishAllStopwatches () |
Logs results of a all previously created stopwatches and the clears them. | |
Properties | |
static string | PersonalChannelName [get] |
Gets the name of your personal channel which is unique to this particular computer. More... | |