简体   繁体   中英

How do I debug this JavaScript error?

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!

You can use the console.log function eg 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 ie 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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM