Click here to Skip to main content
Licence CPOL
First Posted 17 Oct 2000
Views 77,219
Downloads 558
Bookmarked 27 times

Navigate your TRACE outputs

By Wolfgang Busch | 28 Jul 2001
Extended TRACE macros with easy source navigation
1 vote, 16.7%
1
2 votes, 33.3%
2

3
2 votes, 33.3%
4
1 vote, 16.7%
5
4.14/5 - 19 votes
μ 4.14, σa 2.71 [?]

Introduction

XTrace replaces the standard MFC TRACE macros. The macros implemented in XTrace.h add the file name and the line number of the trace point to any trace message (using the built-in __FILE__ and __LINE__ macros). A double click on the trace message in the debug window navigates to the according source line.

Usage

  • If you want to use standard MFC TRACEs and XTRACEs side-by-side:
    1. Add xtrace.cpp to your project.
    2. Include xtrace.h in stdafx.h.
    3. Use TRACEx for standard MFC TRACE's and XTRACEx for navigable TRACE's.

  • If you want to navigate all TRACE outputs:
    1. Add xtrace.cpp to your project.
    2. Include xtracestd.h in stdafx.h. This will replace all standard MFC TRACEx macros with XTRACEx macros.

Updates

2000-10-23

  1. Evaluation of vargs in ExtTrace::Trace fixed.
  2. Macros are expanded to a single statement (using brackets and ',' operator).
  3. Newline will be appended to trace message if necessary.
  4. Macros renamed from TRACE to XTRACE (to use simple MFC TRACE's and XTRACE's side-by-side).
  5. Additional header xtracestd.h (include this header, if you want to replace all MFC TRACE macros with the according XTRACE macros).

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Wolfgang Busch

Software Developer

Germany Germany

Member


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralDoesn't work on MSVC++.NET PinsussAnonymous22:55 16 Jul '02  
GeneralDoesn't work on VC5 PinsussCraig23:15 23 Oct '00  
GeneralRe: Doesn't work on VC5 PinmemberAnonymous7:26 10 Nov '01  
GeneralAre you trying to make this too complex... PinsussPaul Westcott13:24 23 Oct '00  
GeneralRe: Are you trying to make this too complex... PinsussWolfgang Busch15:15 23 Oct '00  
GeneralRe: Are you trying to make this too complex... PinsussPaul Westcott7:42 24 Oct '00  
GeneralNot allways work PinsussYury Goltsman5:55 22 Oct '00  
GeneralUpdated PinsussWolfgang Busch12:57 23 Oct '00  
GeneralDoesn't work on VC6, SP4 PinsussCraig0:35 19 Oct '00  
GeneralBugfix PinsussWolfgang Busch1:24 19 Oct '00  
GeneralUpdated PinsussWolfgang Busch12:59 23 Oct '00  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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 | Mobile
Web01 | 2.5.120210.1 | Last Updated 29 Jul 2001
Article Copyright 2000 by Wolfgang Busch
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid