[Webkit-unassigned] [Bug 117639] New: Feature request: ability to trace execution of JS to console without stepping through in debugger

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 14 06:27:50 PDT 2013


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

           Summary: Feature request: ability to trace execution of JS to
                    console without stepping through in debugger
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebKit Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: garysweaver at gmail.com


Ruby has Tracer and set_trace_func that both allow the ability to with trace each line of Ruby (file pathname, line#, and full line of code that is being executed) to stdout in the case of Tracer, or to call a proc with event, file, line, id, binding, classname in the case of set_trace_func.

I am looking for something similar, such that when Javascript is executed by WebKit, I could have it log everything to its console, or I could hook into events that would occur when every part of the Javascript code that is being executed.

Ariya of PhantomJS said that WebKit does not currently provide this ability: https://github.com/ariya/phantomjs/issues/11404#issuecomment-19435558

There may be a way to do this via remote debugging, but it seems geared toward the inspector UI/typical case of UI debugging vs. just logging or calling a method on a listener or listeners at each point in the JS execution (i.e. why write something that can act as a remote debugger just to have it constantly send requests to step through each line just to log it when there could be a way to do that in WebKit itself?). So, I'm wondering if there is something that could be added to WebKit to make either one of these possible (and just logging each line of the executed stack to console in a way that could being redirected to stdout when run via PhantomJS would be fine, I think).

The use case is that I'm running Jasmine tests in a terminal (in OS X) and I want to be able to turn on something that logs Javascript that is being executed to stdout. I know that this may seem out of scope, but it would really help those that want to write and test Javascript in terminal only without a user-driven debugger.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list