Hello, I was looking for the same some weeks ago, so I decided to write a tracer from scratch. Im not sure if the way I did it was the best way, but I can share with you my information sources.
Basically there is a debug interface (it's mozilla code, not Firebug), that you can use to intercept every script code that is executed (from the site and from the browser) Here is the definition of the debugger service. http://mxr.mozilla.org/mozilla1.9.2/source/js/jsd/idl/jsdIDebuggerService.idl There is as well a Firebug service, wich is part of Firebug(it's no that complicated to use it) so you can FB using this firebug plug in creator. http://www.phpied.com/firefox-firebug-extension-creator-wizard/ Firebug Service, that is defined here. https://developer.mozilla.org/en/FirebugInternals#Firebug_Service This is how the service works in firebug, is useful if you want to use the jsdIDebuggerService, if you understand the code in that file, you got it. http://code.google.com/p/fbug/source/browse/branches/firebug1.6/modules/firebug-service.js#2892 This guy wrote a cool tutorial in how to use the jsdIDebuggerService http://www.hungryfools.com/2008/03/i-was-really-determined-to-figure-out.html Well, now you got the information you need about the execution, you would like to persist it. So, you have some options. Logging the infomation into firebug console, but sometimes, if you would like to debug a webapp like twitter, grooveshark or an application that uses tons of code and really often, then that option will kill your browser in a nutshell. So, what I did, was storing some important information in a buffer, and then using I/O to write a file. (You can write to a file every time there is an execution, but as well, that sounds really bad if you have large file being executed and a lot of xhr) So, check out this https://developer.mozilla.org/en/Code_snippets/File_I//O <https://developer.mozilla.org/en/Code_snippets/File_I//O>I would like to share with you and the comunity the plugin for Firebug and Firefox I have been working on the last weeks, but we have some issues with sw licences that Im expecting to be ok by the end of sept. Don't hesitate writing me for any aditional help. Lautaro. On Mon, Aug 30, 2010 at 10:07 AM, gennad <[email protected]> wrote: > I'm seeking an analogue of xdebug tracing (it produces a file where > are displayed all functions calls in chronological order). It is very > useful when I explore "foreign" code. Are there any analogues in > FireBug? > And if no, is it available to create one? > I found a profiler in FireBug which displays all functions but not in > chronological order. > Thanks! > > P.S. I include some strings from Xdebug's tracefile > TRACE START [2010-08-30 04:13:47] > 0.0584 68488 -> microtime(TRUE) C:\xampp\htdocs\index.php: > 38 > >=> 1283141627.09 > 0.2548 108584 -> require_once(C:\xampp\htdocs\include > \entryPoint.php) C:\xampp\htdocs\index.php:39 > 0.2549 111976 -> defined('sugarEntry') C:\xampp\htdocs > \include\entryPoint.php:2 > >=> TRUE > 0.2549 112000 -> microtime(TRUE) C:\xampp\htdocs\include > \entryPoint.php:89 > >=> 1283141627.29 > 0.2551 112056 -> dirname('C:\\xampp\\htdocs\\include\ > \entryPoint.php') C:\xampp\htdocs\include\entryPoint.php:92 > >=> 'C:\\xampp\\htdocs\\include' > .... > etc. > > -- > You received this message because you are subscribed to the Google Groups > "Firebug" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<firebug%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/firebug?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/firebug?hl=en.
