ManuKaracho ManuKaracho - 7 months ago 29
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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download