Question

I made a bunch of changes to fix a bug where I could not build. One of those changes finally worked, but now I can't debug!

When I leave a breakpoint in my .cs file, the debugger says:

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

Following the advice of stackoverflow, I checked the modules tab (Debug->Windows->Modlues), to see the symbol load information. The problem is, there is no project.dll!

WebDev.WebHost.dll is there and the included system.dlls are there. I checked my coworker's machine and he has the project.dll, so something that I did broke the debugger.

Things suggested in other article I have tried include:

  • Setting the project to debug mode
  • cleaning and rebuilding all
  • Editing the file and then reverting it to make sure it got rebuilt
  • Making sure the correct startup project in the solution properties
  • Making sure everything is built in debug mode in the solution properties
  • Making sure that the ASP.NET debugger is checked in the project properties
  • Making sure that the debug mode was set to full in the project properties
  • Disabling 'just my code' in the debugger settings
  • Restarting visual studios
  • Restarting my computer
  • Running Visual Studios as an Administrator
  • Checking out a fresh copy of the code from source control
  • Upgrading to Visual Studios 2013
  • Switching my browser to Internet Explorer
  • Making sure IIS is pointing to the right directory.
  • Clearing C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\project\ and giving edit permissions to all users.

What sorts of things should I do to get the project.dll into the debugger modules?

No correct solution

OTHER TIPS

May be a bit late to the party but thought I'd share my experience with the exact same problem...

I have a Asp.net Web MVC projcect that I had published to local IIS. After attempting to Attach my visual studio debugger to IIS process I was getting the same 'Breakpoint will not be hit' error, as well as having now project .dll file show in the Debug> Modules list.

My solution was a simple solution in the end but it turns out when I initially published the application to IIS local I had not selected the 'Debug configuration. Because of this I guess my visual studio debugger was never looking for the projects .dll file hence the reason not showing in the list.

I completely removed my app from my local IIS and re-published it using the Debug config rather than Release and it works...

Make sure DEBUG and TRACE constants are checked Make sure optimize code is unchecked.

If you just want to debug it locally, you could configure your project to be run as a web service launched from console app, rather than publishing, hosting in IIS and attaching to it. You have a better chance of getting debug symbols, and it will speed up your workflow. The same code can also be published straight into IIS.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top