title: Why does visual studio .net 2008 lose debug ability after adding global.asax file?
body: <p>I do not get the normal error message saying debugging is not enabled red error message.  If i remove my global asax file, my code goes to my breakpoint.  If i add the file back in, the project runs totally ignoring any break points.  Here is the code inside my global asax file</p>
  
  <p>Public Class Global_asax
      Inherits System.Web.HttpApplication</p>
  
  <pre><code>Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
      ' Fires when the session is started
      Application("concurentUsers") += 1
  End Sub
  
  Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
      ' Fires when the session ends
      If Session("loggedout") = Nothing Then
          Application("concurentUsers") += -1
      End If
  End Sub
  </code></pre>
  
  <p>End Class</p>
  
  <p>So as you can see its not much.  I do receive the following messagebox from visual studio when runnning the project <em>WITH</em> the global .asax file present</p>
  
  <p>"The following module was built either with optimizations enabled or without debug information:  (path to my temp asp.net files) To debug this module, change the project build configuration to debug mode.  To supress this message, disable the 'Warn if no user code on launch' debugger option."</p>
  
  <p>I have tried to delete these temp files, but then causes the project to be completely undebuggable and get the red error messagebox stating so and had to restore from the recycle bin to get my project back in order.  So its very anoying that i have to remove the global asax file in order to debug the project (and any code associated with it threwout the project files)</p>
  
  <p>P.S.  Everything is being run in debug mode along with it marked as such in the web config.  As i said it debugs fine without the global.asax file present</p>