Are there tools or techniques (other than repeated console.log() calls) to view the javascript object model used in a web page in real time? eg something like:
firstUser (User)
-- userName Joe Bloggs (String)
-- userEmail joe.bloggs@gmail.com (String)
-- userSelections (Array)
----[1,2,4]
secondUser (User)
-- userName John Doe (String)
-- userEmail jogn.doe@gmail.com (String)
-- userSelections (Array)
----[1,2,3]
I know this can be achieved using console.log(firstUser) and console.log(secondUser) but it would be useful to be able to display the entire data model so that I can see variables being altered in real time.
You can use the debugger of the development tools in Chrome or Firefox. Just set a break point and view the state of all variables under the scope header.
One option is using the watch panel on the right inside the source tab to help you monitor different variables
You could also use the console.table() method (instead of console.log) which displays tabular data as a table.