On Apr 8, 11:33 am, Canny <[email protected]> wrote: > > > On Apr 6, 9:11 pm, John J Barton <[email protected]> wrote: > > > > Since the Script panel does display JavaScript code, is there a string > > > object representing the displayed JS code? Can I just pass that > > > string object to jsbeautifier to obtain a well-formatted JS code > > > string to display, given that the transformation happens before any > > > other > > > processing on the string such as syntax coloring? > > > Sure, but the line numbers will be all wrong and Firebug will not work > > correctly as a result. > > So do I have to intercept the scripts before Firefox browser gets > handling it? Is this doable via Firebug extension? If it is, could you > explain a little bit how?
No good way I know about. > I used to achieve this goal by a proxy server. But it seems a little > bit cumbersome to do the setups. Besides, dynamically obtained JS code > won't get reformatted. You can intercept the net traffic as we discussed before and the data will be similar to what a proxy server would see. > > > > > > I don't quite need a complex UI. Just want to allow firebug to record > > > the trace > > > without human intervention. It would also be fine even if the JS > > > bytecode level > > > detail is not available in the trace. JavaScript source code level > > > trace (e.g., recording > > > every JS statement that has been executed, along with the values > > > involved in > > > executing the statement) can also be very useful. Even a trace of all > > > functions > > > being invoked could be very useful, but it's better be the case that > > > functions in the trace is > > > identified by some unique internal IDs, rather than superficial alias > > > names. In addition, it's > > > better be the case that the values of functions' true parameters can > > > also be recorded in the > > > trace, so that it's easier to see how certain values are used by the > > > program. > > > Well I don't understand how this can be interesting without human > > intervention. What is the purpose of a trace no one reads? > > By no human intervention, I mean the recording of the trace happens > smoothly (e.g. without requiring one to keep pushing the "Step In" > button). Recorded trace can be saved in a file or displayed somewhere > in a Firebug panel, for human investigation. Yes, but this is the hard part I mentioned earlier. Generating the trace has some issues, like what do about async JS running, but the mechanics of tracing are not difficult. jjb > > -- Yan -- 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.
