Click here to Skip to main content
13,043,650 members (53,040 online)
Click here to Skip to main content
Add your own
alternative version


13 bookmarked
Posted 17 Dec 2005

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

, 17 Dec 2005
Rate this:
Please Sign up or sign in to vote.
use simple macro to output debug string in debug or release version without VC IDE.



Sample screenshot


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.


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.


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


About the Author

Software Developer
China China
No Biography provided

You may also be interested in...


Comments and Discussions

GeneralSuggestions for Improvement Pin
Mike_V18-Dec-05 6:12
memberMike_V18-Dec-05 6:12 
GeneralRe: Suggestions for Improvement Pin
Tankko18-Dec-05 8:31
memberTankko18-Dec-05 8:31 
AnswerRe: Suggestions for Improvement Pin
DerMeister18-Dec-05 22:19
memberDerMeister18-Dec-05 22:19 

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.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170713.1 | Last Updated 17 Dec 2005
Article Copyright 2005 by xwp
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid