Debugging of Visual Studio 2010 (Breakpoint settings, variable view)

Source: Internet
Author: User
Tags visual studio 2010

2012-03-29 22:35:27| Category: C + + learning | reporting | font size subscription

(1), set breakpoints where a pause is required

(Method One: Place the mouse on the line where you want to set the breakpoint, press F9 or select Set breakpoints in Debug method Two: Click the left side area of the line of code where you want to set the breakpoint), as shown in the following illustration:

(2), click "Start Debugging" or F5, to debug;

(3), when the program executes to the breakpoint, execution pauses (in break mode), as shown in the following figure:

(4), the value of the variable can be checked at this time

Method One: Hover the mouse pointer over the variable, the value of the variable will be displayed, as shown below the red background of the word, in fact, the mouse is in the middle of the letter R and T, in its lower right side of the display of its value. (This method can just put the mouse on the variable)

Method Two: Place the mouse on a variable, right-click, and "Add Watch" (Add Watch),

The name and value of the variable will be displayed in the generated Watch window

(5), you can choose "progressive" debugging or F11, "step-by-step" debugging or F10, such as continuous press F10, you can see the value of the table changes,

(6), until the end of the program, finish debugging.

Note: In (4), look at the value of the variable, we can also use SHIFT+F9, open the Quick Watch window, and then enter the variable name, view the value of the variable, or open the Quick Watch window, and then fill in the "Watch Window."

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.