Overview of JavaScript debugging techniques in Google ie _javascript tips

Source: Internet
Author: User

Today, I found a corner that never noticed before, I believe I can greatly improve my writing JS speed. can quickly detect errors.

For example, today's overtime is an example of debugging a JS error discovery.

  1, Google Browser reported the wrong

The above is the error of the Google Browser, only to report an error file, I believe that is the place by null called the length property caused. Since this is a system that has been maintained for several years, people are coming and going, and do not know how many have gone through the hand. And the business logic is extremely complex, JS files are thousands of lines. It is obviously impractical to exclude a length by one length.

2014.3.18

Just know today, alas, the original Google browser also has the wrong call stack:

  2, IE reported in the wrong

Debugging JS in IE is like debugging. NET in VS, there is a call stack, as long as you point a few, you can find out where this line of code is invoked in error:

The above is the entire content of this article, I hope to help you, thank you for the support of cloud habitat community!

Related Article

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.