vs Debug Tip Aggregation

Source: Internet
Author: User
Keywords We debug can debugger
Tags code data debug debugger debugging group how to how to do

In the VSX group Feng, recorded a few debugging video, feel very useful. Debugging in fact everyone knows how to do it. But I don't necessarily know all the shortcuts I've been given to develop the IDE. Here I do some of these rally, here is not very full, I hope everyone in the back to make up, let the landlord also Zhang Insight, haha.

1:dbgview and vs Output windows:

For the second vs debug State where I write debug output in my code, we can see the VS Output window, print some of the variable data we care about, and so on. We can use DbgView to get our print when our program is running.

2: Breakpoint: (This is familiar to everyone):

VS to provide us with Condition,hit Count, Filter, when Hit, Edit Lab, export centralized operations, here is not much to say, we all know.

When debugging multiple processes, we can filter other processes with filter to concentrate on one process:

A conditional breakpoint can debug not only the condition, but also the value of an expression when it is changed. For example, a variable i, I only care where he changes, if the change on the breakpoint stop.

3:debugger:

Provides us with an excuse for operating system to enable communication with the debugger. There are several important ways to do this:

1:break: Signals a breakpoint that connects to the debugger.

2:islogging: Check that the debugger for the connection is logging enabled.

3:launch: Launches the debugger and connects it to the process.

4:log: Sends a message to connect to the debugger.

5:isattached (properties): Gets a value indicating whether the debugger is connected to the process.

4:datatips:

It gives us the value of modifying variables when we debug.

5: Unusual Processing decisions:

In Debug->exception, where we can set up an exception to throw the decision. Sometimes for our block of code that has been caught by a try, I need to find the exception block to get the VA to catch up and see where the anomaly stops.

6:debug attribute:

VS provides us with a few attribte:debuggerbrowsable,debuggerdisplay and so on to facilitate our debugging. Useful for debugging complex objects.

7:debuggervisualizers:

We want to see the debuggervisualizers of a DataTable:

Everyone must be familiar with In fact this is what we can customize (implementing the DialogDebuggerVisualizer abstract class under Microsoft.VisualStudio.DebuggerVisualizers), see Demonicsoft Buddy's Custom visual The Studio debugging window. In this inspiration we can customize some of the commonly used debuggervisualizers, I feel like our XML operation, when debugging we want to see the node and its child node structure, in contrast to our program to run. There are also WinForm or WPF interface drawings, and in some cases we would like to see the result of our form or drawing, and so on.

Finally put on the video download http://fengchen.wordpress.com.cn/2010/11/17/netappdbgsumup/, I hope we also have more top. Tips not mentioned in this essay, I hope you also put forward.

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.