the only thing i know how to javascript is using alert(). is there any other way to help debugging javascript ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Using Firebug, and the web development tools on other browsers, you can use commands such as
to watch for variables, instead of the more disruptive
alert. With the consoles on most development tools, you can also run arbitrary pieces of Javascript from there without having to modify the actual code, which can help immensely with with debugging Javascript. Oh, and the break on error function helps too.When you open up Firebug you see something like this. Click on the console tab and enable it:
Enter your code after the
>>>. Just for fun try something like$('body').css('-moz-transform', 'rotate(10deg)')😀