0

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!?

asked May 26, 2011 at 18:18
5
  • Your code ? !, is your code inline or from external .js source ? Commented May 26, 2011 at 18:22
  • inline. That's what I meant by its "on my page". Commented 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. Commented 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 anywhere Commented 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. Commented May 26, 2011 at 18:42

4 Answers 4

1

Have you tried clicking the following button?

enter image description here

answered May 26, 2011 at 18:23
Sign up to request clarification or add additional context in comments.

8 Comments

@Marnix Yes. "I tried unchecking the file in the "filename" dropdown in the Script panel, but that doesn't do anything."<br/>Except in my Script panel. The drop down is the name of my jQuery file: jQuery.js, where yours is "firebug-and-jquery"
@Nicklamort: click the file you need to view
@Marnix Hmm, I just noticed that when I include the jquery file, it doesn't compile my inline js code..all my event handlers don't work. That must be the reason.. but why would it do that?
@Nicklamort You could check 2 things. First: check if the 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.
@Marnix The only error I get is when I try to click in my textbox. The 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.
|
1

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.

answered May 26, 2011 at 18:37

1 Comment

Thx. That made it obvious that my js code isn't even there, not even under the HTML tab. Please see my update in OP.
0

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.

answered May 26, 2011 at 18:24

Comments

0

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.

answered May 26, 2011 at 18:27

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.