[5-4] Visual Studio tip: Create a breakpoint with conditions

Source: Internet
Author: User
Menu: [Right-click a breakpoint]-> Condition
Version: 255.2010

Do you know? You can set breakpoints with conditions. This is quite powerful among the various breakpoints you have created. Using them wherever appropriate will give you more efficiency.

Let's open the breakpoint condition dialog box. Note that you can disable conditional filtering by selecting the checkbox. In addition, you have two options for this condition:

"True" is a Boolean expression that can be true or false.

"Change?" As it said-it stops when the condition changes.

For example, I have the following "for" Loop

True

I can set a simple "true" condition, that is, when I> 5, it stops.

When I> 5

"Has changed"

This is very interesting. Generally, you need to track the changes of some content. In this example, I only observe the changes of I.

When the breakpoint is hit and the value of "I" has changed in any way then the code stops:

Remarks

When you set an advanced breakpoint, the breakpoint icon changes accordingly.

 

You can place the mouse over a breakpoint to view the type of the breakpoint,

 

Or open the breakpoint window to view

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.