2

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 F5
  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
3
  • 1
    I think this might help if you havent treid any of them yet .stackoverflow.com/questions/2446756/… Commented Dec 31, 2014 at 15:25
  • Is debug set to true in your web.config? How are you running the project? Are you attaching to an IIS working process? I also get this message when debugging my web site projects, if my breakpoints are set on files that are not currently loaded onto the page. My breakpoints are hit though when i navigate to a page when that file gets loaded. Commented Dec 31, 2014 at 15:27
  • @dotnetstep, almost all of the debugging questions on StackOverflow (that one included) are geared towards Web Applications. On a web site I cannot do things like clean/rebuild etc. Commented Dec 31, 2014 at 15:28

1 Answer 1

2

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?

Protected Sub Page_Load(sender As Object, e as System.EventArgs)

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

End Sub
Sign up to request clarification or add additional context in comments.

2 Comments

heh thanks for the edit, I don't really know much of VB syntax :P Seems like in VS2012 (C# anyway) you'll get that same warning, but the breakpoint will hit on the bracket opening the function. Don't know if the same holds true for VB, but putting the break in the function itself will do it :)
By the way, if it shows that error at first when debugging, it will clear as symbols continue to be loaded into IIS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.