RESOLVED INVALID Bug 16441
Support for saving js stack trace to file
https://bugs.webkit.org/show_bug.cgi?id=16441
Summary Support for saving js stack trace to file
Vicki Murley
Reported 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.
Attachments
enable webkit to save javascript trace from inspector window (5.52 KB, patch)
2008-02-01 15:13 PST, Sajesh
aroben: review-
patch that saves the JS trace to file (1.04 KB, patch)
2008-02-01 17:24 PST, Sajesh
aroben: review-
Vicki Murley
Comment 1 2007-12-14 14:39:06 PST
Sajesh
Comment 2 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
Sajesh
Comment 3 2008-02-01 17:24:20 PST
Created attachment 18863 [details] patch that saves the JS trace to file
Sajesh
Comment 4 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.
Adam Roben (:aroben)
Comment 5 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.
Adam Roben (:aroben)
Comment 6 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.
Timothy Hatcher
Comment 7 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).
Timothy Hatcher
Comment 8 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.
Note You need to log in before you can comment on or make changes to this bug.