0

I used to see all my javascript objects content like this before:

My objects' content before

But now, I don't know why but it doesn't show their content at all:

My objects' content now

I use visual studio 2015 community with cordova and Ripple emulator. I tried to create a new project or even tried to uninstall / reinstall VS2015, but it didn't work. To make it more clearly, I don't have the "expando-toggly" button on the left of my objects any more. Do you have any idea about the reason ? I just use console.log and console.error as I always did before.

Community
  • 1
  • 1
Pierre Hofman
  • 175
  • 1
  • 15

1 Answers1

0

To make it more clearly, I don't have the "expando-toggly" button on the left of my objects any more. Do you have any idea about the reason ?

console.log/console.error take two arguments, the first is argument is the string message, which will be printed as a string in js console. The second is the object message, which can be expanded like an object.

So if you want to log the object in javascript console. You simply need to pass the object as the second argument to console.log/console.error.

ex:

var parentElement = document.getElementById('deviceready');
console.log("parentElement: ", parentElement);

and the result: enter image description here

Elvis Xia - MSFT
  • 10,801
  • 1
  • 13
  • 24
  • I already tested this way, it has the same behavior. Also, console.log(yourObject) works too, it doesn't have to take 2 arguments It displays: http://puu.sh/s46QF/0b44a01192.png – Pierre Hofman Nov 02 '16 at 16:26