Debug levels
-
Hi all, I am a pure C++ programmer and new in .NET and VB. So sorry for this simle question I use for tracing in my applications normally following way to have debug levels. //my_proj_globals.h #ifdef _DEBUG extern unsigned int debug level #define DEBUG_MSG(msg,num) if ((debug_level)&(((unsigned int )1)<
-
Hi all, I am a pure C++ programmer and new in .NET and VB. So sorry for this simle question I use for tracing in my applications normally following way to have debug levels. //my_proj_globals.h #ifdef _DEBUG extern unsigned int debug level #define DEBUG_MSG(msg,num) if ((debug_level)&(((unsigned int )1)<
It's too much to go into here in the forums, but you can do what your thinking of. You'll be using the Trace and Debug classes as well as creating your own Trace Switches with the Switch class. If your really proficient in C++, you should have any trouble at all digging into the Trace and Debug docs here[^] and check out a little example of creating your own Trace Switches here[^]. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
It's too much to go into here in the forums, but you can do what your thinking of. You'll be using the Trace and Debug classes as well as creating your own Trace Switches with the Switch class. If your really proficient in C++, you should have any trouble at all digging into the Trace and Debug docs here[^] and check out a little example of creating your own Trace Switches here[^]. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Hi Dave, I am sorry to mention this, but: How your anwer can be helpful to me? Of course I allready reviewed both links you sent and as I wrote I also played around with trace switches. If you know the answer you could just check it on your PC and then sent to me/or forum, if not... ( "if you really... " is just wasted bits) Sorry once more. The points are: 1.I can't find how I can in visual basic print a source file name and a line, where in C++ you have __LINE__ and __FILE__ preprocessor macros 2.How to switch on and off multiple groups of trace messages depending on the global variable. 3.In the documentation some .config file mentioned what is it? I couldn't find some in the project subtee Thanks you all in advance, Boni
-
Hi Dave, I am sorry to mention this, but: How your anwer can be helpful to me? Of course I allready reviewed both links you sent and as I wrote I also played around with trace switches. If you know the answer you could just check it on your PC and then sent to me/or forum, if not... ( "if you really... " is just wasted bits) Sorry once more. The points are: 1.I can't find how I can in visual basic print a source file name and a line, where in C++ you have __LINE__ and __FILE__ preprocessor macros 2.How to switch on and off multiple groups of trace messages depending on the global variable. 3.In the documentation some .config file mentioned what is it? I couldn't find some in the project subtee Thanks you all in advance, Boni
Boniolopez wrote: 1.I can't find how I can in visual basic print a source file name and a line, where in C++ you have __LINE__ and __FILE__ preprocessor macros You can't. The file and line number information is not exposed through the BCL or through compiler constants or directives. The best you can do is a Strack Trace from the System.Diagnostics namespace. Boniolopez wrote: 2.How to switch on and off multiple groups of trace messages depending on the global variable. Was covered in the example in the 2nd link. Switch Class[^] allows you to make your own custom Trace switches. The functionality of witch wuold be to let you create your own levels of trace information. Boniolopez wrote: 3.In the documentation some .config file mentioned what is it? I couldn't find some in the project subtee The is a file called
_applicationname_.config
. The filename matches the name of the .EXE. So if you have myApp.exe, the config filename would be myApp.exe.config. Docs[^] RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome