Debug information output under release

Source: Internet
Author: User

The main principle of the software debugging information output in release is the application of the information to be debugged.Program, Send the message to the debugging receiver, then the debugging receiver accepts the debugging information, and then provides the output for the user to choose from. To achieve the purpose of analysis and debugging.

I have developed a debugging information receiver. If you want to use it, you can download it from my resources-the all-around debugger, or search for it in Google and download it now. This is a commonly used software by software developers. The all-around debugger helps you solve your problems. The all-around debugger can be used not only for debugging information output, but also as an information output software to monitor the running of your software. You are welcome to give your valuable comments.


The usage is as follows:

1. Define the call function in your program.

2. Call this method in use. You can see the debugging information in dbgview.

DT ("work OK in line % d", m_nline );


// DT is a macro to help debug app by dump useful info,
// It works for debug and release version.
// DT ("work OK in line % d", m_nline );

// Define following line to enable dt
# Define DT debugtrace

bool debugtrace (char * lpszformat ,...)
{< br> static hwnd =: find0000wa (null, "dbgview");
If (! Iswindow (hwnd)
hwnd =: find0000wa (null, "dbgview");
If (hwnd)
{< br> static char szmsg [512];
va_list Arglist;
va_start (Arglist, lpszformat );
{< br> vsprintf (szmsg, lpszformat, Arglist);
}< br> catch (...)
{< br> strcpy (szmsg, "debughelper: invalid string format! ");
}< br> va_end (Arglist);
DWORD dwid = getcurrentprocessid ();
:: sendmessage (hwnd, wm_settext, dwid, (lparam) (lpctstr) szmsg);
}< br> return true;

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: 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.