title: "Design Mode" preprocessor directive
body: <p>I have a <a href="http://social.msdn.microsoft.com/forums/en-us/winformsdesigner/thread/29383926-3DD1-4732-88A0-3148FD3F3B2D">problem</a> on displaying a component in Designer.</p>
  
  <p>I identified the "bad" code that the designer does not like.</p>
  
  <p>Now, the problem is that I can't "comment" it for design time only using preprocessor directives.</p>
  
  <p>Now, I tried (for VB.NET) the following</p>
  
  <pre><code>#If Not Debug Then
  Private Sub myWpfComponent_ItsEvent(sender, args) Handles myWpfComponent.ItsEvent
  ...
  #End If 
  </code></pre>
  
  <p>this... worked, and now it is displayed without problems in the designer.</p>
  
  <p>The problem now that I am afraid do not be able to <strong>debug</strong> properly this component.</p>
  
  <p>So, I am searching for a workaround à la </p>
  
  <pre><code>#If Not DESIGN_TIME Then
  #End If 
  </code></pre>
  
  <p>Is there something similar?</p>