Debug Javascript in Visual Studio

Source: Internet
Author: User
In Asp.net, debug JavaScript step by step. In this article Article IIS and Visual Studio 2005 are used.

Configuration
Step 1:
Open an existing Asp.net application in Visual Studio 2003/05ProgramWhich requires some JavaScript.

Step 2:
When we create a web project in Microsoft Visual Studio, a file named Web. config is created in this web project by default.
Let's check its settings.<CompilationDebug= "False"Strict= "False"Explicit= "True" />

Set the debug attribute to true as follows:

< Compilation Debug = "True" Strict = "False" Explicit = "True"   />

Step 3:
Open Internet Information Service (IIS) Manager
Start> Administrative Tools> Internet Information Service (IIS) manager-> website-> default website-> right-click the web project you want to debug-> properties-> virtual directory tab-> Configuration-> select debug in the new windows window tab-> select the check boxes "enable ASP server script debugging" and "enable ASP Client script debugging. (See 1)
Figure 1

Step 4:
Open IE, click "Tools"-> Internet Options-> Advanced tab-> cancel "Disable script debugging (Internet Explorer)" and "Disable script debugging (Others)" in the menu bar). (See 2)
Figure 2

Step 5:
Now, open your web project in Visual Studio IDE.
Note: javascript must be placed in a separate. js file, instead of writing JavaScript directly on the. ASPX page. Then add a breakpoint to a line in the. js file just like the. CS or. VB file.

Step 6:
When you run your web project, the program stops running at the breakpoint you set.

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.