title: Visual Studio 2012 - Variable missing from Locals Window
body: <p>I have never seen this before and have no idea what it causing it.</p>
  
  <p>When I put a breakpoint at the end of code below, the elapsedSeconds variable is NOT listed in the locals window. If I try to Watch it, the Value = "The name 'elapsedSeconds' does not exist in the current context". How is that possible???</p>
  
  <pre><code>public ActionResult Index()
  {
      Stopwatch sw = Stopwatch.StartNew();
  
      var userID = WebSecurity.GetUserId(User.Identity.Name);
  
      var model = ModelHelper.GetModel(userID);
  
      long elapsedSeconds = 0;
      elapsedSeconds = sw.ElapsedMilliseconds;
  
      return View(model);
  }
  </code></pre>