1

I am working on a staging site, and the homepage slider isn't work. I'm new to debugging JavaScript, how do I break down, with Firebug, or using the console, why the slider isn't working?

I've tried just about everything, and I've come up empty. Hoping a pro can come in and help me through it, and that in turn will teach me for future debugs.

Thanks guys and gals!

1
  • 1
    Whittle your code down to a small example that fails. Then share that failing code using jsbin.com. Commented May 26, 2011 at 0:32

1 Answer 1

1

You can use the console.log function e.g console.log("some debug info"); to output informaiton such as variable states and see how far the code is executing. You can view this output using Google Chrome Developer Tools i.e. click the tool icon at the top right and then Tools > Developer Tools or Cntrl + Shift + I.

This also works for Firefox's WebConsole (Cntrl + Shift + K).

Sign up to request clarification or add additional context in comments.

2 Comments

You can also install Firebug for Firefox and see the same output. Firebug will also display errors and help in various other cases, similar to Chrome developer tools.
In a world where we have breakpoint-able script debuggers, you really shouldn't do this. When the execution stops on a breakpoint, you can check out the current scope in firebug/inspector or just type out the variables of interest in the console.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.