How to debug a program in VS2013

Source: Internet
Author: User

First, the Debugging method

1, in the necessary location of the program press F9 (or click the beginning of the mouse with the location of the power-down flag can set breakpoints or cancel breakpoints).

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. At this time

Press F11 to run one step at a time: when you encounter a call to another block, you enter the module's internal step-by-step operation;

When you press F10 to run in the current program segment, when you encounter another segment of the call, when a statement gets the result of the run, it jumps directly to the next step and does 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 operation of the program to view, monitor

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, 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, if the Watch window is open, directly add the selected expression as a watch.

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

C. Right-click on the watch to remove the unnecessary monitoring items by selecting Delete.

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.

How to debug a program in VS2013

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.