Asp. ENT Development Debugging Page JS code believe that even the rookie will, but I still have to wordy step. Because the use of JS on the page is too frequent, but also too prone to problems. Even if the master on the page to write long JS code, there will inevitably be bugs appear, out of the bug can only obediently debugging.
Asp. NET development, the background debugging code does not say, the direct code line breaks the point to be good. The front desk is a bit of trouble.
Pre-preparation work, generally in two kinds of situations.
One is to run the debugging directly in the project, such as visual studio2010 and the above directly in the VS to find the corresponding page to run directly.
Another is to deploy to IIS, then you have to open the app's page, then open vs project, attach to process debugging.
Either way, the key is to break the point and get the program to stop somewhere.
It is believed that many people have also used alert to display the value of a possible problem or the main sentence of a control's property. This is also a debugging method.
Of course the use of more is the following steps.
The first step is to open your default browser, or the one that your page is about to run. Settings to enable debugging,
The second step, in the suspicion of the problem of JS interrupt point, that is, add a sentence: "Debugger;",
The third step, perform the operation, the program will stop in debugger place,
Fourth step, you can F10 one step, look at the error, if you want to see a variable or an expression or the properties of the control, then use the monitoring function,
,
For example, this quick watch can put expressions, variables, controls, and so on to see all of its members, but you can also manually modify it here until you see the results you want.
This step is also the most used and very heavy step.
Finally, if it goes well, the problem is found. If there is something wrong, go ahead.