RESOLVED FIXED 17234
Inspector should link console.{log,warn,info,error} back to call site
https://bugs.webkit.org/show_bug.cgi?id=17234
Summary Inspector should link console.{log,warn,info,error} back to call site
Adam Roben (:aroben)
Reported 2008-02-08 13:56:26 PST
The Inspector should link the output from console.{log,warn,info,error} back to the call site.
Attachments
Proposed patch (15.86 KB, patch)
2008-09-02 10:09 PDT, Timothy Hatcher
kmccullough: review+
Adam Roben (:aroben)
Comment 1 2008-02-08 14:18:28 PST
Adam Roben (:aroben)
Comment 2 2008-03-31 14:02:34 PDT
In general we have no way of knowing what line number the console.* method was called on.
Adam Roben (:aroben)
Comment 3 2008-03-31 14:06:37 PDT
(In reply to comment #2) > In general we have no way of knowing what line number the console.* method was > called on. ...nor do we know what the URL of the script that made the call was.
Geoffrey Garen
Comment 4 2008-07-23 20:36:31 PDT
One way to solve this problem would be for console.log to use a special CallType that gets additional information passed to it when it's called as a function. Basically, this would require: * Add a new CallType to the CallType enum in JavaScriptCore * Make console.log's getCallData function return that CallType * Change the sites in JavaScriptCore that deal with CallType to handle this new CallType (I think there are about 4)
Keishi Hattori
Comment 5 2008-08-11 07:14:11 PDT
*** Bug 19791 has been marked as a duplicate of this bug. ***
Keishi Hattori
Comment 6 2008-08-11 08:34:53 PDT
(In reply to comment #4 at bug #19791) > I think using CustomCall for the Console object is fine. The majority of the > console functions want this info. > I tried doing "interface [CustomCall] Console {" but that doesn't seem to change the CallTypes for console.*. Calling console() seems to have the new custom CallType but that's not what I want.
Kevin McCullough
Comment 7 2008-08-18 11:06:26 PDT
I talked with Geoff about how to get the line numbers and source files for more than just these functions. I think we are going to be taking this in another direction. Once that lands, these should be simple to implement.
Timothy Hatcher
Comment 8 2008-09-02 10:09:58 PDT
Created attachment 23116 [details] Proposed patch
Timothy Hatcher
Comment 9 2008-09-02 15:00:36 PDT
Landed in r36029.
Note You need to log in before you can comment on or make changes to this bug.