Bug 16441 - Support for saving js stack trace to file
Summary: Support for saving js stack trace to file
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2007-12-14 14:37 PST by Vicki Murley
Modified: 2014-12-14 20:02 PST (History)
2 users (show)

See Also:


Attachments
enable webkit to save javascript trace from inspector window (5.52 KB, patch)
2008-02-01 15:13 PST, Sajesh
aroben: review-
Details | Formatted Diff | Diff
patch that saves the JS trace to file (1.04 KB, patch)
2008-02-01 17:24 PST, Sajesh
aroben: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vicki Murley 2007-12-14 14:37:47 PST
I'd like to be able to save a javascript stack trace to a file from within Drosera.  Ideally it would show me the function body as well as the function name.
Comment 1 Vicki Murley 2007-12-14 14:39:06 PST
<rdar://problem/5645672>
Comment 2 Sajesh 2008-02-01 15:13:31 PST
Created attachment 18857 [details]
enable webkit to save javascript trace from inspector window

changes are done in 
1. inspector.html/inspector.js - to add the check box to toggle the
functionlity
2. InspectorController.cpp/InspectorController.h - to save the log
Comment 3 Sajesh 2008-02-01 17:24:20 PST
Created attachment 18863 [details]
patch that saves the JS trace to file
Comment 4 Sajesh 2008-02-01 17:26:40 PST
(In reply to comment #0)
> I'd like to be able to save a javascript stack trace to a file from within
> Drosera.  Ideally it would show me the function body as well as the function
> name.
> 

the saving function is there in JavaScriptCore/kjs/function.cpp. Currently these changes are integrated with the Inspector window. This can also be done from Drosera.
Comment 5 Adam Roben (:aroben) 2008-03-13 22:51:04 PDT
Comment on attachment 18857 [details]
enable webkit to save javascript trace from inspector window

Thanks for the patch!

Patches need to be marked r? in order to be reviewed.

You need to explain the changes you made in your ChangeLog. You should also set the CHANGE_LOG_NAME and CHANGE_LOG_EMAIL_ADDRESS environment variables so that prepare-ChangeLog will generate a correct ChangeLog header.

This patch puts a lot of CoreFoundation-specific code into a cross-platform source file, InspectorController.cpp. We should be using WebCore's cross-platform functions/types instead.

We don't normally put in comments referencing the bug report that motivated the addition of the code.

I think this feature would make a lot more sense in the Inspector if we had an integrated JavaScript debugger (see bug 17134). Until then it makes more sense in Drosera.

We probably want to present a file picker to the user so that they can choose where to save the file instead of saving to an arbitrary file in a Mac-specific location (we want this to work on non-Mac platforms as well).

Please read our code style guidelines at <http://webkit.org/coding/coding-style.html> and make sure your code conforms to them.
Comment 6 Adam Roben (:aroben) 2008-03-13 22:51:43 PDT
Comment on attachment 18863 [details]
patch that saves the JS trace to file

I'm not sure we want to save the stack trace for every function that's called. That seems a bit overkill. And the user of environment variables to set the location seems rather fragile.
Comment 7 Timothy Hatcher 2008-03-24 20:08:40 PDT
I am not sure this is needed once we have console.trace() (bug 14354) and fast in-process debugging (bug 17134, bug 17770, bug 17778).
Comment 8 Timothy Hatcher 2008-05-17 09:44:50 PDT
This also sounds like functionality a JavaScript profiler would provide. We are in the process of adding a profiler.