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 );
try
{< 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;
}