ManuKaracho ManuKaracho - 2 months ago 12
AngularJS Question

How can I check if debug information is enabled in angular?

One can toggle angulars debug infos by calling


within the config method of an angular app.

Is there a way of checking if debug information is enabled via the console when an app is running in the browser?

Answer Source

The debugInfoEnabled function is a setter/getter. It can be checked in a config block.

app.config(function ($compileProvider) {
    var debugEnabled = $compileProvider.debugInfoEnabled();
    console.log("debugInfoEnabled=", debugEnabled);

See the source code.