ym.util.Debug

Overview

Singleton-Debugger-Factory.

Methods

attach(prefix, object, forceShowopt) from v3

Adds debugger functionality to an object.

Parameters

Name Description Data type Default value
prefix Adds a name to a logging. string  
object The object to be modified. object  
forceShowopt Forces the visibility of log entries. bool false

Rückgabe

ym.core.Loggable

Example call

function MyClass() {
    ym.util.debug.attach("MyClass", this, true|false);
}

var instance = new MyClass();
instance.log("Hello World!");
// Output of the development tool:
// => MyClass: Hello World!