Tracing and debugging WPF with debugview

Source: Internet
Author: User

I saw VC debugging with debugview.Program, Very envious, After pondering that WPF can also use this stuff.

Write trace. writeline ("trace stuff") in the program. After relase,

Run debugview and perform corresponding operations to view the output information.

It is also found that the configuration file can be set to output to the TXT file.

App. config is as follows:

<? XML version = "1.0" encoding = "UTF-8"?> <Configuration> <system. Diagnostics> <trace autoflush = "true"> <listeners> <! -- <Add type = "system. diagnostics. textwritertracelistener "name =" textwriter "initializedata =" tracetext. log "/> --> <add type =" system. diagnostics. xmlwritertracelistener "name =" textwriter "initializedata =" tracexml. log "/> </listeners> </Trace> </system. diagnostics> </configuration>

Textwritertracelistener outputs the specified content to a text file

Xmlwritertracelistener outputs detailed information to a text file in XML format.


Share two articles Article :

Create a logger using the trace listener in C #
Http://www.daveoncsharp.com/2009/09/create-a-logger-using-the-trace-listener-in-csharp/
. Net tracing tutorialhttp:
// Www.codeguru.com/csharp/.net/net_debugging/tracing/article.php/c5919/

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.