Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Debug levels

Debug levels

Scheduled Pinned Locked Moved Visual Basic
csharpc++debuggingquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Boniolopez
    wrote on last edited by
    #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)<

    D 1 Reply Last reply
    0
    • B Boniolopez

      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)<

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      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

      B 1 Reply Last reply
      0
      • D Dave Kreskowiak

        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

        B Offline
        B Offline
        Boniolopez
        wrote on last edited by
        #3

        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

        D 1 Reply Last reply
        0
        • B Boniolopez

          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

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups