I'm working on a Web Site Project as opposed to a Web Application Project. As such, there is no project file to build and produce a .dll library file or .pdb debugger symbols file.

Right out of the box, if I create a brand new web site project, try to set a breakpoint anywhere, and run with the debugger on, I get the following message:

The breakpoint will not currently be hit. No symbols have been loaded for this document.

Screenshot

I must be overlooking something simple, because there must be a way to debug an ASP.NET Web Site. Right?

Steps to reproduce:

  1. Open Visual Studio (confirmed in 2010 and 2008)
  2. Create New Web Site Project
  3. Select ASP.NET Web Site
  4. Add a Load Event handler to Default.aspx.vb
  5. Run with Debugger <kbd>F5</kbd>
  6. This will prompt you to have <compilation debug="true" /> in your web.config if you don't already, select yes.
  7. Debugger symbols will not be loaded for the page because it is compiled on the fly

You might need to actually put the breakpoint inside the method, as you're saying "break before this line is executed". On function declaration, how do you break before that line?

<!-- language: lang-vb -->
Protected Sub Page_Load(sender As Object, e as System.EventArgs)

   ' Some Page load task - try setting your break point here.

End Sub