[Webkit-unassigned] [Bug 165681] Web Inspector: Console could be made useful for very simple await expressions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 19 22:51:59 PST 2016


https://bugs.webkit.org/show_bug.cgi?id=165681

Joseph Pecoraro <joepeck at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |joepeck at webkit.org

--- Comment #10 from Joseph Pecoraro <joepeck at webkit.org> ---
(In reply to comment #6)
> (In reply to comment #4)
> > Created attachment 296882 [details]
> > [PATCH] Proposed Fix
> > 
> > I think I want to play with this a bit more. The `console.info` may be a
> > little too weird since for primitive values it stringifys the primitive. So:
> > 
> >     console.info(1);
> >     console.info("alpha");
> > 
> > Look the same as info messages with the string "1" or "alpha".
> > 
> > We could do something like:
> > 
> >     console.info("Awaited result", x)
> 
> That will not get `x` assigned to the proper $result or $n. Is there a way
> we can do that?

No, there is currently no way to programmatically get a $n in the Console, which is effectively what this is trying to do. We would have to add something to the protocol, console, or somehow detect awaited results and act on them.

I think we can use:

    console.info("%o", value);

And get pretty good behavior here. Certainly good enough for the common case.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161220/04eccf34/attachment.html>


More information about the webkit-unassigned mailing list