WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
17229
Inspector should show properties of all JS objects in Console
https://bugs.webkit.org/show_bug.cgi?id=17229
Summary
Inspector should show properties of all JS objects in Console
Adam Roben (:aroben)
Reported
2008-02-08 13:51:53 PST
The Inspector should show properties of all JS objects in the Console, and give you a way to inspect those properties.
Attachments
allows inspection of objects by just printing them to the console
(5.08 KB, patch)
2008-12-29 14:26 PST
,
Konstantin Käfer
no flags
Details
Formatted Diff
Diff
shows some example inspected objects
(64.14 KB, image/png)
2008-12-29 14:28 PST
,
Konstantin Käfer
no flags
Details
changelog patch
(868 bytes, text/plain)
2008-12-29 14:44 PST
,
Konstantin Käfer
no flags
Details
updated patch which includes the changelog
(5.93 KB, patch)
2008-12-29 14:49 PST
,
Konstantin Käfer
no flags
Details
Formatted Diff
Diff
patch with more information in changelog
(6.73 KB, patch)
2008-12-29 15:03 PST
,
Konstantin Käfer
no flags
Details
Formatted Diff
Diff
do not print expandable objects in array literals
(7.85 KB, patch)
2008-12-29 16:09 PST
,
Konstantin Käfer
no flags
Details
Formatted Diff
Diff
better patch which doesn't include the bogus select field
(6.91 KB, patch)
2008-12-30 02:55 PST
,
Konstantin Käfer
timothy
: review-
Details
Formatted Diff
Diff
updated patch with code style fixes
(6.82 KB, patch)
2008-12-31 06:56 PST
,
Konstantin Käfer
timothy
: review+
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Adam Roben (:aroben)
Comment 1
2008-02-08 14:17:34 PST
<
rdar://problem/5732829
>
Adam Roben (:aroben)
Comment 2
2008-02-11 13:44:06 PST
Perhaps we could add a panel/tab similar to Visual Studio's QuickWatch window that lets you dig down into the properties of one object.
Konstantin Käfer
Comment 3
2008-12-29 14:26:49 PST
Created
attachment 26296
[details]
allows inspection of objects by just printing them to the console
Konstantin Käfer
Comment 4
2008-12-29 14:28:28 PST
Created
attachment 26297
[details]
shows some example inspected objects
Konstantin Käfer
Comment 5
2008-12-29 14:44:14 PST
Created
attachment 26301
[details]
changelog patch
Konstantin Käfer
Comment 6
2008-12-29 14:49:53 PST
Created
attachment 26302
[details]
updated patch which includes the changelog
Konstantin Käfer
Comment 7
2008-12-29 15:03:56 PST
Created
attachment 26303
[details]
patch with more information in changelog
Konstantin Käfer
Comment 8
2008-12-29 16:09:00 PST
Created
attachment 26305
[details]
do not print expandable objects in array literals
Oliver Hunt
Comment 9
2008-12-30 02:29:52 PST
I like the look of the output of this, but i'm not sufficiently familiar with inspector to have any idea as to whether the code is the best it could be. Carrying the inline parameter around seems inelegant to me. I was going to CC tim and adam, but they should already be getting mail -- can one of you guys look at this?
Konstantin Käfer
Comment 10
2008-12-30 02:55:10 PST
Created
attachment 26310
[details]
better patch which doesn't include the bogus select field
Timothy Hatcher
Comment 11
2008-12-30 06:57:05 PST
Comment on
attachment 26310
[details]
better patch which doesn't include the bogus select field Patch looks great! Some minor comments. r- for ow for some clean up.
> - formattedResult.appendChild(formatForConsole(parameters[i])); > + formattedResult.appendChild(WebInspector.console._format(parameters[i]));
Why this change? The formatForConsole function just calls WebInspector.console._format.
> + if (x instanceof Node) { > + while (this.titleElement.firstChild) { > + this.titleElement.removeChild(this.titleElement.firstChild); > + }
You should use this.titleElement.removeChildren() instead of the while loop (a prototype extension we have in utilities.js.)
> + } > + else {
The "else {" should be on the previous line, so it is "} else {".
> +.console-formatted-object .section, .console-formatted-node .section { > + position: static; > +} > +
There should be 4 spaces here for the indent, not 2.
Konstantin Käfer
Comment 12
2008-12-31 06:56:30 PST
Created
attachment 26335
[details]
updated patch with code style fixes
> > - formattedResult.appendChild(formatForConsole(parameters[i])); > > + formattedResult.appendChild(WebInspector.console._format(parameters[i])); > > Why this change? The formatForConsole function just calls > WebInspector.console._format.
formatForConsole() passes the parameter true for inline, but that is not what we want in all cases. The attached patch fixes that and does treat "console.log(window, document)" as inline again (thus they won't be expnadable). Doing a "console.log(document)" (i.e. with only one element) will now trigger the expandable mode.
Timothy Hatcher
Comment 13
2008-12-31 11:55:13 PST
Comment on
attachment 26335
[details]
updated patch with code style fixes Nice work! Thanks for the patch!
Oliver Hunt
Comment 14
2009-01-01 17:08:35 PST
Committing to
http://svn.webkit.org/repository/webkit/trunk
... M WebCore/ChangeLog M WebCore/inspector/front-end/Console.js M WebCore/inspector/front-end/PropertiesSection.js M WebCore/inspector/front-end/inspector.css Committed
r39537
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug