VC output debugging information

Source: Internet
Author: User




To output debugging information for VC programming, you can use the outputdebugstring API function. For example, you can use:


Void ctestdlg: onbutton1 ()

{

//
Todo: add your control notification handler code here

Outputdebugstringa ("Hello!
I am here ");

}

 

As long as it is a string, you can use it to output the variable value and track the program execution path to find the program bug.

 

So how to view the output string, you need to use a tool called dbgview, interface:

 

: Http://download.csdn.net/source/1066665

: Http://download.csdn.net/source/1066650

 



Once you run dbgview, the string output by calling outputdebugstring is displayed as a record on the dbgview interface. Let's see if you are tempted by this debugging method?

 

 



The outputdebugstring function can be used in both application code, dll/lib library code, and driver code, which is universally applicable. Think about it. If your program is composed of several dynamic link libraries, one EXE, and one service, you can use outputdebugstring in any link library, EXE, or service, during the overall joint debugging, these outputdebugstring calls work at the same time, which is really convenient!

 

 

 


 

 

 

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.