Summary: | Web Inspector: Ability to trace execution of JS to console without stepping through in debugger | ||
---|---|---|---|
Product: | WebKit | Reporter: | Gary Weaver <garysweaver> |
Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | bburg, joepeck, timothy, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Description
Gary Weaver
2013-06-14 06:26:26 PDT
There are JS tools that can instrument your code to do what you want (from what I understand anyway). Have you seen http://siliconforks.com/jscoverage/? Thanks, but I'm not looking for a code coverage utility. I wanted to be able to hook into Javascript execution to be able to write to console.out instead of debugging with the browser's developer tools. Having a way to trace the execution to the console (or in the case of PhantomJS, it could log it to the terminal console) and filter it also would be awesome. It isn't enough to just use Javascript to do it. Here are two attempts I made: The first tried to hook into the function prototype, but that is bad news- AngularJS and similar don't play well: https://github.com/garysweaver/autolog.js The second just changes the JS code you give it to log to console: https://github.com/garysweaver/noisify It would be really helpful to have something instead like these that are offered in Ruby, but to do it via the Webkit API, since it isn't likely to be added in Javascript anytime soon: http://www.ruby-doc.org/core-2.0.0/TracePoint.html http://www.ruby-doc.org/stdlib-2.0/libdoc/tracer/rdoc/Tracer.html http://www.ruby-doc.org/core-2.0.0/Kernel.html#method-i-set_trace_func As a log-spam type thing, this is really out of scope for Web Inspector UI. |