One of Mvc sample code debugging ---- debugging tools and settings (combined debugging with firebug and)

Source: Internet
Author: User

Set IIS before debugging

You must debug the bs program. At this time, we can use the debugger that comes with vs. However, this debugger Often crashes and often changes the port. Is there a better way? We can use IIS for debugging. However, many of my friends have not installed IIS on the bs program host for a long time. So let's raise a question: when is the IIS installation time? How can I fix installation errors?

IIs installation time

IIS should be installed immediately after the system is installed. Win7 or server2008 already comes with IIS on the local machine, so you no longer need to install the disk. We only need to open the Add window Function in the control panel.

Figure 1. iis installation 1

Find the web management tools and World Wide web Services in Internet Information Services in windows, expand all the trees, and then select all (if you only select the highest level, some functions are not selected by default ). Select All and click OK.


How can I solve the problem of incorrect IIS installation time?

If IIS is installed after Framework4, an error occurs when you set up an asp. net4.0 website. (In most cases, it is reported that the content of the Error HTTP 404.2-Not Found "IIS 7.5 request seems to be a script and thus cannot be processed by a static file handler .)

We can solve this problem as follows:

Open the cmd window and enter the following command: C: \ Windows \ Microsoft. NET \ Framework \ V4.0.30319 \ aspnet_regiis-I

After running, you can.

Set IIS debugging for

Set up a website with source code in IIS to point to the project where the source code is located:

Figure 2. iis pointing

Open the project in vs, right-click the = attribute on the project to be debugged, and click web on the page that appears:

 

Figure 3. vs debugging settings

In the start operation, click "Do not open", click "use local iis web server" in the server, and enter the address in iis.

Finally, enter the URL to debug in the browser.

 

Figure 4. web Server Input

In this way, you only need to place a breakpoint in vs to debug the background code.

What if the project cannot be opened after configuration?

Sometimes, we open the above-configured project on a machine, but iis does not point to the Project address. In this case, the project cannot be loaded. In this case, you only need to direct iis to the address and then reload the project..

Vs Basic Debugging operations

Vs debugging shortcut:

F5 jump to the next breakpoint

F10 statement execution one by one (when a function is not entered)

When a function enters the F11, common statements are executed one by one.

Front-end debugging tool

I think Firefox Firebug is a good tool for front-end debugging. However, personal tools are good. However, I do not like ie in private, and it is easy to die during debugging.

Firebug Installation

Click Tools => additional components in Firefox, enter firebug in the input box on the pop-up page, press enter, you can see it in the list, and click Install.

 

Figure 5. firebug download

Figure 5-2. firebug Loading

After you open the URL in Firefox, click the gray firebug button in it and you will find it in color. You can see the real body of firebug in:

Figure 6 firebug

Click each tab, as shown in script, and click "reload ".

 

Figure 7. firebug Script Loading

 

 

 

 

Figure 8 firebug debugging

In, you can click the breakpoint on the js Statement on the left and debug it in the upper right corner. If ajax is submitted, it is forwarded to the background.

Click console to view the interaction data and js errors between js and the background.

Now, let's talk about how to debug it in the next section with a small example.

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.