On Mar 24, 5:42 pm, John J Barton <[email protected]> wrote: > I suggest as a next step that you install Firebug 1.6X.0a8 in a new > Firefox profile and try it on your localhost version.
1. Installed FB 1.6X.0a8 on usual profile (with 14 add-ons) and on completely new profile with only FB added to it (besides those there with profile creation). 2. On both profiles, when the HTML document is loaded from localhost, the Script panel shows added code lines in external JS files, and in one of the JS files the code lines is exactly doubled! 3. When HTML document loaded from server on remote host, FB shows the code lines of both JS files properly. Thus there is no difference in results between 1.5.2 and 1.6x on FF3.6 with both profiles. > > If it works, you can try variations between this setup and your > current one (Firebug version, stuff in your profile). > > If it fails you can open Firebug > Firebug Icon Menu > Open Tracing > > Options SOURCEFILES. Clear then load you problem page. The URL of the > sources will appear in the trace. It is not apparent to me what effect these instructions have. I don't see where the URL appears in the trace. But there are other things. 1. when loading the page, the code in the Script panel does not appear fully (only the first two lines) until a key is pressed so as to step into or over the code. 2. the dropdown list below the FB menu that shows all files containing JS code DUPLICATES the file names of the two JS files. It shows the file names with different cases in the characters. For example, the file names of the original JS files have mixed cases: one is mysqlClass.js and the other is dbSchema.js. When these are selected in the dropdown list, both selections say "Failed to load source for:" and then it gives the fully qualified URL. The other file names are ALL lowercase: mysqlclass.js and dbschema.js. Only these selections from the dropdown list show the source code with repeated or even fully duplicated lines. So as an experiment, I made the following changes: 1. the two JS filenames were changed to all lowercase using Windows Explorer 2. the script elements in the HTML file were changed to load in the two JS files using all lowercase letters: <script type="text/javascript" src="mysqlclass.js"></script> instead of the attribute being src="mysqlClass.js" which reflected the former accurate letter case of the file name. When the page was loaded on http://localhost again, there were ONLY two external JS files in the dropdown list, not 4, with no failed to load source. What was more, the code was correctly loaded and the stepping during debugging presented accurately! === Thus the bug in FB is that it is somehow looking at case sensitivity of the filenames, failing to find/load the sources with their filenames in proper case sensitivity, and instead loading the files using all lowercase, and doing a bad job of it. When all filenaming is lowercase, both in the filesystem and in the HTML document, everything is okay. Should this be the case? The one host, running Linux (remote free web hosting site), actually FAILS to serve documents unless the case sensitivity of the file name is used properly. The other host (localhost), being a Windows system, fails to serve the document even with correct correct filename character case sensitivity; only when it is all lowercase is there no defect in serving. With Unix/Linux filesystems, clearly the file (object) 'mysqlclass.js' is different from 'mysqlClass.js', and the distinction must be noted in specifying the URI. But Windows systems are not sensitive to case in filenaming, but still there was a problem with FB loading source code correctly with the filename entered in mixed case just as it exists in mixed case on the file system. This is a bug in something, but I am not sure if it is FF or FB. > jjb > > On Mar 23, 10:09 pm, M Gozler <[email protected]> wrote: > > > I am using FF 3.6 with FB 1.5.2 for developing a site using Javascript > > as well as PHP/MySQL. I have installed Apache 2.2 (on my Windows 6.x > > [Vista Home Premium 32-bit]). > > > In one PHP document, I load two JS files, one called "dbSchema.js" and > > the other "mysqlClass.js". The first JS file just defines a single > > variable (serverSchema) which is an array of arrays of strings the > > contain names and characteristics of a MySQL database, with all its > > structural components, in this case one database containing two > > tables, and each table containing a variable number of fields whose > > characteristics are defined (field name, field type and length, field > > collation, null and default setting status, etc). > > > I am using FB to step through the bugs in the JS code naturally. The > > problem is that both db.Schema.js and mysqlClass.js have been loaded > > the coded in the Script panel window not as they are. Lines of code > > are repeated and inserted randomly. This makes stepwise tracing/ > > debugging impossible. There are two curious things here (#2 is really > > curious): > > > For the purposes of being concise about the problem, I have stripped > > the irrelevant content and code of the PHP document into an HTML file > > "dbSchema.html" (the URL to this is at the bottom of this message). > > > 1. FB seems to have the code for execution correctly within its > > memory, but the problem is the code it presents to the user in the > > Script panel window. For example. line 347 of mysqlClass.js is the > > entry point or function definition (line #1) of the DatabaseSchema > > object, which is called from the HTML document. But line 347 is shown > > in the Script panel as the 7th line of the function definition above > > it, the definition for the Database object. I could use FB to trace > > execution if I follow the line numbers in FB alone, but I have to have > > my text editor (that I use for editing all documents) open side-by- > > side to follow the trace. > > > 2. Now here's the real astonishment: if you click the URL below to > > see the improper loading of the Script panel, you may not actually see > > it. You may actually be able to do the step trace properly in FB. > > Why? Because in order to present this problem to you and this group, > > I uploaded the three files (dbSchema.html, dbSchema.js, mysqlClass.js) > > to a free web hosting site we use, and then downloaded the HTML file > > and FB loaded and presented the code of the JS files properly, without > > randomly repetitive and inserted lines of code!! In other words, the > > problem seemed server dependent!! > > > I have re-started Windows (and thus the server), and the problem of > > badly presented code still occurs athttp://localhost. And FB loads > > and presents the code correctly when it is loaded from > > hosthttp://nilgulkaradeniz.awardspace.info. Is this bizarre? > > > This problem, and all the code of the JS files, is brought together > > and explained in fuller detail > > athttp://nilgulkaradeniz.awardspace.info/dbSchema.html. > > -- 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.
