Re: venkman and firebug loading source code for a page without sending the params that were sent when the browser made the call
James Ross <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.jsdebugger |
|---|---|
| Message-ID | <[email protected]> |
[email protected] wrote: > i am debugging a site with venkman and firebug. > it seems the debuggers try to get their own copy of the source from > the > web server (instead of taking the browser's copy as i would expect) > and > call it without the params it needs (which the browser itself did > send > when it loaded the page). > i am interested to know if this behaviour is by design. it would seem > strange to me if it were so, since different params might mean > totally > different source sent to the browser. > (in case it matters the page on which i saw this problem handles a > multipart/form-data form submition.) I can't speak for FireBug, but I assume it's fundamentally the same problem. The low-level debug API that Venkman and FireBug use (called JSD) reports only the file name (URL/URI) of the source for the code. This presents a problem - how to get the source [1]. The normal behaviour of both is to fetch the URL given, which is fine for your average static HTML or JavaScript file. As you found, it's less than sufficient for dynamically generated and form-result pages. In Venkman, you can turn on Pretty Print with Ctrl-P, the toolbar item, or from the View menu. Pretty Print will show you JavaScript code reconstructed from the compiled code being executed; this means that it wont be your bracing style and wont have any comments, but it will be the right code. The is usually sufficient. Hope that helps. -- James Ross <[email protected]> ChatZilla and Venkman Developer [1] In theory, it could get the browser's cached copy, but there are issues; what if the same URL is loaded twice, and via DOM/JS they are different? What about secure pages that aren't cached by the browser? Etc.