I'm trying to debug my js code on my page that includes a jQuery file using Firebug (I'm new to jQuery..and Firebug kinda). However, Firebug is only showing me the 8k+ lines of jQuery code, and doesn't show my code anywhere. Where can I find my code? And is there a way to skip over certain external script files? I tried unchecking the file in the "filename" dropdown in the Script panel, but that doesn't do anything.
Thanks
Update: I just realized that when I include the external jQuery file, my inline js code, which is defined right after in <head>, isn't even recognized/compiled. None of my event handlers are defined or anything><
And when I include the jquery file after my inline js code, my inline code is compiled and there, but my whole form is missing!! WTH is going on!?
-
Your code ? !, is your code inline or from external .js source ?MBarsi– MBarsi2011年05月26日 18:22:22 +00:00Commented May 26, 2011 at 18:22
-
inline. That's what I meant by its "on my page".Nick Rolando– Nick Rolando2011年05月26日 18:23:50 +00:00Commented May 26, 2011 at 18:23
-
If there is javascript in your html instead of a js file, it will also be listed in the same list.Marnix– Marnix2011年05月26日 18:26:39 +00:00Commented May 26, 2011 at 18:26
-
@Marnix That's what I figured..but its not. I ran a search and couldn't find my inline js functions. Also fb is showing me the same num of lines of code as in the jquery file. I can't find my inline code anywhereNick Rolando– Nick Rolando2011年05月26日 18:29:52 +00:00Commented May 26, 2011 at 18:29
-
If it's not in the list, update your question. Ask about the not-compiling-problem as well. Maybe other people have more solutions than my comment.Marnix– Marnix2011年05月26日 18:42:58 +00:00Commented May 26, 2011 at 18:42
4 Answers 4
Have you tried clicking the following button?
enter image description here
8 Comments
console tab tells you anything. If not, there is just a compiler error in your code. A missing ; or what not. It doesn't always show you what is wrong with your code. And sometimes, just sometimes, you'll have to check in IE what your compiler errors are. But first, turn on your Console tab.onfocus js handler (thats missing) isn't defined. But when I don't include the jquery file, it works fine. The console isn't showing me any other errors, especially not in jquery, it is straight from the jquery website.if you have an inline piece of code it's easier to find in the 'HTML' tab of firebug.
just look for the <script> tag you have put on the page.
1 Comment
You do not uncheck a file in it. The checkmark shows you what file is currently displayed in the console window.
Scroll down the list of files and find your JavaScript file and click on it. It will open up in the window.
Comments
Under script tag you will find a list of .js files loaded for that particular page. just select it from the dropdown. The check you are talking about is for selecting a particular file from the dropdown.