Using the debugger

Strata declares a global function named debug(). This function is very useful while developing because it allows you to dump object values both in the HTML and in the logs.

Should you have previously declared your own global function named debug before Strata is executed, Strata’s version will not be injected over the predefined one.

The function accepts anything for as many parameters as you would like.

    $bar = "bar";
    debug(null, "foo", $bar);

Would print the following in your logs:

Debug output