VS2013 debugging Methods in C #

Source: Internet
Author: User

First, the Debugging method

1, in the necessary location of the program press F9 (or click on the beginning of the line with the mouse to set a breakpoint or cancel breakpoint).

2, press F5 to run the program, the program runs to the breakpoint will be paused waiting for the user to choose the next action.

3, then press F11 as a single-step operation: When the call to other blocks will enter the module's internal step-by-step operation, pressing F10 when the current program segment in a single step run, encountered other calls to the other program segments when a statement to get the results of the run, and then jump to the next, will not enter the program segment. Press F5 to always run to the point where there is a breakpoint, without a breakpoint running directly to the end.

Second, the program operation to view, monitor, modify variables worth the method

1. Command window: View--and other Windows---command window to open the Command Window, command window prompt for [;], enter [?] after prompt. In the input of the expression you want to get the result, say hello to the following space, enter will be able to get results.

? Rd[0]. ToString ()//Enter the first field value in the command window that you want to view into the RD recordset

"ZP_BAOZLDW"//Results

>//Command Window re-emergence of new prompt after executing command

2. Instant window: Debug-Window-Instantly open the instant window, function and command window basically the same, but no prompt [;], do not need to enter [?] No.

Rd[0]. ToString ()//Enter the first field value in the command window that you want to view into the RD recordset

"ZP_BAOZLDW"//Results

3. Monitoring:

A, after selecting the expression you want to monitor, right-click on it, and select [Add Watch] in the menu that appears, if you do not open the Watch window will open the Watch window directly and add the selected expression as a watch item.

If the Watch window is open, add the watch directly to the selected expression.

B, Debug-------Monitor 1 (4 monitors with 1~4) to open a watch window and then copy and paste the expression you want to watch into the watch area to add a watch

C. Right-click in the monitoring phase to remove unnecessary monitoring items.

4, Fast monitoring: Select the expression you want to monitor, right-click on it, and choose [QuickWatch] in the menu that appears, then directly open the Quick Watch window and add the selected expression as a watch.

5. Auto window: the auto window can be opened by debugging------the window automatically prompts for object data related to the currently running statement.

VS2013 debugging Methods in C #

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.