I tried to debug some code today, Firebug's Script pane confronted
me with this message:
No Javascript on this page
If <script> tags have a "type" attribute, it should equal "text/
javascript" or
"application/javascript". Also scripts must be parsable
(syntactically correct).
I looked this up on the Web and found that it means exactly what it
says, except that it can also be caused by a <script> tag that does
not specify type="text/javascript".
All of my scripts do specify type="text/javascript".
Where was the problem? Well, if Firebug wouldn't tell me, how was I
supposed to find it?
I began a long session of debugging by elimination. After ruling out
every bit of JavaScript my script uses -- including the parts that
hadn't changed since the script worked or were used in other scripts
that didn't have the problem -- I went to work on my script's main
file.
That was insane, because the main file contains no JavaScript at all
-- only references to include files that I'd already cleared. But it
worked! When I eliminated the entire body of the script, FireBug
worked correctly.
I then started putting stuff back in, expecting to zero in on the bit
of code that was getting Firebug upset.
Wrong. I eventually reinserted the entire script, leaving it exactly
as it was when I started, and Firebug continued to work correctly.
Now I can begin debugging my script, after a couple of hours of
totally unproductive problem identification.
I hope someone can explain what happened here, and how to prevent a
repeat. Firebug is a great tool when it works, but when it does things
like this it ceases to be Firebug, and becomes just plain Bug.
--
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
https://groups.google.com/forum/#!forum/firebug