Debugging JS with Firebug

Source: Internet
Author: User

JS code is undoubtedly a very frustrating thing, although it gives people's vision has brought a great impact, but it and its flexible grammar and very trivial details and it makes people headache. Ajax is the emergence of a web revolution, in fact, Ajax is not something new, but Ajax is now a web developer must have one of the basic capabilities. The use of Ajax has made the user's experience a notch, but the difficulty of developing a programmer has also improved. Although there are a lot of Ajax frameworks: Jquery,dojo,ext ... But still can not change a lot of writing background code programmers do not want to write the status of JS code (sweeping: I do not want to write JS code, today a JS code to make me whole for several hours).

The tool is to serve the people, just like there is oppression there are both rebellious, because everyone writes the JS code is difficult so the understanding of the Mozilla company withdrew from the Firebug, the following I said the application of Firebug:

The first step: Download Firebug. Open Firefox's tool options, select components, search for Firebug plug-ins, add and install.

Part II: After the installation is completed, press F12 or click to view the Firebug options can be firebug.

This is the Firebug debugging window, in fact, the Firebug function is very powerful, I just use the understanding is not too much. The script is to adjust the JS script file; HTML, CSS, console and Eclipse console function is similar, will prompt you with some error and warning information; The network records some information that interacts with the backend server, such as the specific link address, and the time that interacts with the server.

The third step, with some of the above understanding, the following specific debugging a program (main debugging JS):

The leftmost yellow button is: Step into the middle of the button is: One step skip, the rightmost button is: Step out, the triangle button is executed to the next breakpoint.

I am talking about, I debug js some tips: Take today's mistake. Today's mistake is actually very simple but I've wasted a few hours. I always think it is the reason of my JS code, so I am debugging and debugging in Firebug ... Finally, there is no result. The type of error is the failure to interact with the backend server. There is another reason to make this mistake, because I see multiple JS code through the network and the background is interactive

The interaction time is also recorded above. Finally put the link address copy out in the address bar to visit a bit, ah Grand ah ... Wrong background code ... But it's a happy mistake.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.