New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 7 users
Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2014
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature

Blocked on:
issue 327109



Sign in to add a comment
Access printed objects in console from command line
Reported by jacklu...@gmail.com, Oct 10 2013 Back to list
UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.69 Safari/537.36

Steps to reproduce the problem:
1. Call console.table with an array, DOM Element, object
2. Element appears in table but cannot be clicked or expanded

Test case:
http://jsfiddle.net/jlukic/gxF3r/4/

What is the expected behavior?
The console.table should allow clicking on the DOM element or array, object to expand to see more detail like console.log.

Console.table should not report (index) in table logs of each tuple, this can be implied by the order or rows.

What went wrong?
It looks like console.table is not automatically expanding native types like other console calls.

Did this work before? No 

Chrome version: 30.0.1599.69  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 11.8 r800

I am the creator of a UI framework Semantic UI <http://www.semantic-ui.com> that uses console.table and console.groupCollapsed to create collapsed traces through components. 

For a more complex example visit the project website and scroll down to the cute dog :)

Firefox supports "object expansion" from console.table and its a critical defect for the project that Chrome does not support them as well.
 
console.jpg
61.7 KB View Download
Comment 1 by jacklu...@gmail.com, Oct 10 2013
Here is an example of a complex trace from Semantic in firefox and in chrome.

Notice that firefox allows for arrays to be shown, and clicking on them allows for viewing the expanded property lists of large objects and arrays.
complex_trace.jpg
317 KB View Download
complex_trace_ff.jpg
332 KB View Download
Owner: aandrey@chromium.org
Status: Assigned
Status: Started
I suggest that we should implement a popover in the console view. It will be triggered for elements in the object previews, including the console.table() console message.

Project Member Comment 4 by bugdroid1@chromium.org, Oct 24 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=160457

------------------------------------------------------------------------
r160457 | aandrey@chromium.org | 2013-10-24T15:43:37.203137Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/ConsoleView.js?r1=160457&r2=160456&pathrev=160457
   M http://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/DataGrid.js?r1=160457&r2=160456&pathrev=160457
   M http://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/ConsoleMessage.js?r1=160457&r2=160456&pathrev=160457

DevTools: console.table attached inside a collapsed console group is not resizeable.

A DataGrid being attached to a hidden parent (e.g. collapsed console group) can not
initialize column widths right away and just skips it. And it will never do so
unless explicitly asked. Thus the problem happens when the parent becomes visible.

To overcome this we call wasShown() for console messages and groups recursively.

BUG= 306120 
R=pfeldman,vsevik,eustas@chromium.org

Review URL: https://codereview.chromium.org/28923003
------------------------------------------------------------------------
Comment 5 by jacklu...@gmail.com, Oct 24 2013
I just wanted to say thanks for taking on this issue so promptly, it will vastly improve debugger support for Chrome with projects that choose to use the grouped table approach for nesting debug.

I wanted to remark though, a popup for viewing object previews is helpful, but it would be nicer to be able to dig down into nested objects from variables inside console group, which would require clicking into individual properties of objects.
Summary: Access printed objects in console from command line (was: Console Group does not Link to Objects, DOM Elements, etc)
Labels: -Type-Bug -OS-Windows Type-Feature OS-All
 Issue 309099  has been merged into this issue.
Comment 9 by jacklu...@gmail.com, Mar 11 2014
Any update on this issue? It's very crucial for component traces for JS developers.
Blockedon: chromium:327109
Project Member Comment 12 by bugdroid1@chromium.org, May 15 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=174104

------------------------------------------------------------------
r174104 | aandrey@chromium.org | 2014-05-15T20:21:49.555344Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/console/ConsoleViewMessage.js?r1=174104&r2=174103&pathrev=174104

DevTools: For non-lossless console.table() also print the data object.

This is to access printed objects inside console.table().
Also print the data object when console.table() would print nothing.

BUG= 306120 
R=pfeldman

Review URL: https://codereview.chromium.org/290473003
-----------------------------------------------------------------
Status: Fixed
This doesn't appear to be fixed.

In the original jsfiddle:
http://jsfiddle.net/jlukic/gxF3r/4/

Data-objects are still not clickable, and indexes still appear inside console.table.
Can you describe steps to reproduce the problem?
Steps to reproduce the problem:
1. Call console.table with an array, DOM Element, object
2. Element appears in table but cannot be clicked or expanded

Test case:
http://jsfiddle.net/jlukic/gxF3r/4/

Objects are not linkable inside console.table
There is an expandable Array[1] object right after the console.table to address the issue.
Please check the screenshot for my concerns

In console.log statements
- DOM elements appear specially formatted
  * Hovering an element variable highlights it in the page
  * Element shows blue link with selector

- DOM Events appear specially formatted
  * DOM event object shows up as event name

In console.table currently
  - All arguments appear as a single indexed variable after console.table 
  - These links must somehow be matched back to the table output by a developer


chromebug.jpg
179 KB View Download
Sign in to add a comment