Debug Javascript in Asp.net

Source: Internet
Author: User
Debug Javascript in Asp.net CodeThe main methods are as follows:
1. Add a debugger before the JavaScript code to be debugged, which is equivalent to a breakpoint
Note: In this method, you must disable the script debugging (Internet Explorer) and disable the script debugging (other) options in Internet Options of IE.

In this way, when you debug the website, you can access the statements at the debugger.
2. When you press F5 in vs2005 to debug a website, there is a window under the debugging menu, and there is a script resource manager under the window to open it, the running page is displayed in the view of the script resource manager. Double-click the page where you want to debug the js code to open the running page, the page can be paused at this time, but the disadvantage is that this method of debugging is after the page load, so if the code you want to debug is placed in the load method, this method cannot be debugged.

In this way, you can directly open the page in IIS and start script debugging in IE.

3. Place the JS Code in a JS file. In vs2005, You Can breakpoint the code in the JS file, including the load Event code. You can set debugging here.
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.