title: Are there any compiler / preprocesser tricks to debug print an enum's name?
body: <p>I often find myself writing helper debugger methods that return a printable string, given some enum value. The reason for this is when you typically log an enum, all you get is a number really. I hate having to go back to my source to figure out what that enum is. So I would do something like</p>
  
  <pre><code>typedef enum
  {
     kOne = 1,
     kTwo,
     kThree,
  }
  MyEnum;
  
  NSString *debugStringForEnum(MyEnum e)
  {
      switch ( e )
          case kOne:
              return @"One";
          case kTwo:
              return @"Two";
          ....
  }
  
  ....
  NSLog(@"My debug log: %@", debugStringForEnum(someVariable));
  </code></pre>
  
  <p>So my question is, is there any way to avoid writing all this helper code, just to see the label value of enum?  </p>
  
  <p>Thanks</p>