1

I'm trying to inspect the $ionicTabsDelegate variable on my hybrid app using this "dump" solution which can be found here.

function dump(obj) {
    var out = '';
    for (var i in obj) {
        out += i + ": " + obj[i] + "\n";
    }

    alert(out);

    // or, if you wanted to avoid alerts...

    var pre = document.createElement('pre');
    pre.innerHTML = out;
    document.body.appendChild(pre)
}

But once I call my dump function, I'm getting this error on the console:

RangeError: Maximum call stack size exceeded

So, how can I check this object?

Community
  • 1
  • 1
Mauker
  • 11,237
  • 7
  • 58
  • 76

1 Answers1

1

You might have tried the top voted solution and run into errors, because it tried to access just whatever too often.

You could give the answer by @PPrice a try (worked fine on some occasions) and just use

alert(JSON.stringify(myVar)); // or whatever you want to do with myVar

JSON.stringify should avoid circular dependencies and such.

Community
  • 1
  • 1
serv-inc
  • 35,772
  • 9
  • 166
  • 188