Click here to Skip to main content
15,914,410 members
Articles / Desktop Programming / MFC
Article

use DT,DW and DE in VC++ to output debug info.

Rate me:
Please Sign up or sign in to vote.
1.00/5 (2 votes)
17 Dec 2005 24.8K   172   13   3
use simple macro to output debug string in debug or release version without VC IDE.

DT_demo.rar

 

Sample screenshot

Introduction

I created three macro to output string in debug or release mode:

DT,DW and DE.

DT is used for output general string.

DW is used for warnning string.

and DE for error.

They are displayed with different colors.

usage is the same as TRACE.

First of all,add #include "dt.h" to stdafx.h

dt.h is include in sourcecode.

demo:

DT("general info,int=%d,errString=%s",1234,"stringDemo");

DW("warnning:%s","StarCraft is my favorite game");

DW("err,something unhappy occurs");

File info and line is add automatically.

Use DT.exe to receive message.

you can find DT.exe in sourcecode directory.

You can write your own DT receiver app,but if somebody want the sourcecode of DT.exe,I will attach it to here.

That's all.

Game over.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
xwp
Software Developer www.MayGion.com
China China
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralSuggestions for Improvement Pin
Mike_V18-Dec-05 6:12
Mike_V18-Dec-05 6:12 
GeneralRe: Suggestions for Improvement Pin
Tankko18-Dec-05 8:31
Tankko18-Dec-05 8:31 
AnswerRe: Suggestions for Improvement Pin
DerMeister18-Dec-05 22:19
DerMeister18-Dec-05 22:19 
You can use the free 7zip program for rar files. The winrar program lost direction when the original author/developer passed away.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.