title: Clear Stack in Visual Studio Immediate Window
body: <p>When working with the immediate window, one has to differ between runtime and designtime.</p>
  
  <p>If I use the immediate Window on design time and put a local variable in stack:</p>
  
  <pre><code>string s = "test";
  </code></pre>
  
  <p>VS will start the compiler and create a new variable called s on the Heap and place a Pointer to it on a temporary stackframe it uses during designtime. (At least I <em>think</em> thats how it works, at least simplified. Please correct me if I'm wrong, though)</p>
  
  <p>From now on, I am not able to use s for anything else, until I run my application or close VS:</p>
  
  <pre><code>int s = 12;
  A local variable named 's' is already defined in this scope
  </code></pre>
  
  <p>I can use the contextmenu to clear the immediate window, but this really just clears the window itself. My local variables still stay on the stack.</p>
  
  <p>I was wondering, if there is really not way to clear all variables I previously created inside the immediate window?</p>
  
  <p>(Im using VS 2012 SP1 Prof. but I guess the issue stays the same with every version of VS)</p>