6

I have a web project (DNN module) that I am developing and I recently updated to Visual Studio Professional 2015 Update 3.

I am using IIS 10 on a windows 10 PC

When I try to F5 / Debug my app I get the following warning on any breakpoints:

the breakpoint will not currently be hit. no symbols have been loaded for this document

What I have tried to fix this:

  • I enabled directory browsing inside IIS 10
  • I Run VS in admin mode / elevated permission
  • Updated MS ASP.NET and Web Tools extension to latest version
  • Updated MS ASP.NET Web Framework and tool extension to latest version
  • cleared out and re-downloaded all debug symbols
  • Clean and rebuilt in both release and debug mode
  • Made sure modules runAllManagedModulesForAllRequests="true" is set in system.webserver of web.config
  • Restart IIS / refresh application pools, and restart website
  • using a different port for the website
  • obviously restart computer / and visual studio

I am at a total loss and really need help. I can not figure out why my breakpoints are not being hit, when I debug the site no errors are thrown and the site runs fine.

Other Attempts:

From this SO thread I tried:

From This SO Thread I tried:

  • disable "just my code" in debug general settings

From User suggestions:

  • I have tried attaching directly to the w3wp.exe process - no breakpoints hit and visual studio crashes when I try to stop debugging. Also, as soon as I attach the debugger, the website stop workings all together

Question

Can someone help me figure out why my break points are not being hit when debugging from visual studio.


EDIT # 1: Additional attempts

  1. When I debug my application and open the Debug -> Windows -> Modules window I do not see the name of my projects dll / pdb file in the list of Modules. I tried going to Debug -> Options -> Symbols and clicking the Load All Symbols button. I included a screen shot. My dll or project is named krisisShifts so the dll created in the obj/Debug folder is krisisShifts.dll and KrisisShifts.pdb etc. The blue mark on the image shows the dll is not listed in the loaded modules. Also I included the default attached process Visual studio is using to debug the site marked in Red.

enter image description here

  1. I also deleted the site and application pool from IIS and recreated them with different names, site displays fine, but no breakpoints hit

EDIT 2: Attach to process now works

Not sure what I did. I have been fighting with this all day and afer restarting the computer and visual studio numerous times I can now attach to process w3wp.exe and the breakpoints are hit.

However hitting F5 still does not work. The site loads but no breakpoints are hit and I can see that my projects .dll is not added to the debug modules list (but it is when I attach to process).

I feel like I am closer but still can not figure out why my project .dll is not loaded in the debug modules when hitting f5.

Community
  • 1
  • 1
J King
  • 4,108
  • 10
  • 53
  • 103
  • Have you checked the output path for the DLL's in Project Properties? Check the other debug settings in there? – IrishChieftain Sep 30 '16 at 06:10
  • @IrishChieftain I have checked the output path, the .pdb files are being created – J King Sep 30 '16 at 06:13
  • At the very least, you can attach to the process? – IrishChieftain Sep 30 '16 at 06:14
  • @IrishChieftain I have attached to w3wp process but the breakpoints are not hit, in fact the site stops working properly once I attache the debugger. Specifically the web.api calls no longer work. – J King Sep 30 '16 at 06:30
  • also, when I stop debugging after attaching to w3wp process, visual studio crashes and restarts. yeah!! – J King Sep 30 '16 at 06:33
  • Take a look at this? http://stackoverflow.com/questions/2155930/fixing-the-breakpoint-will-not-currently-be-hit-no-symbols-have-been-loaded-fo – IrishChieftain Sep 30 '16 at 13:08
  • @IrishChieftain, I did look at that thread and found that if I Debug and then Open Debug -> Windows -> modules, my dll / pdb file is not loaded. – J King Sep 30 '16 at 13:57
  • Have you tried using full IIS instead of the Express version? – IrishChieftain Sep 30 '16 at 23:46
  • Yeah, I think switching from "IIS Express" to "Local IIS" in the Web tab of the project properties is what allowed me to get it to work with attaching process – J King Sep 30 '16 at 23:48
  • Is Webcompanion by Lavasoft installed on your machine? – IrishChieftain Oct 03 '16 at 19:04
  • @IrishChieftain thanks for sticking with this, but no Webcompanion is not on my machine – J King Oct 03 '16 at 20:11
  • In Options | Debugging | Symbols, did you make sure that the symbols are loaded for all modules and that your modules are not among the excluded ones? – ConnorsFan Oct 05 '16 at 15:43
  • @ConnorsFan you bet. I have no excluded modules and ALL modules is selected – J King Oct 05 '16 at 16:36
  • In Project properties | Build | Advanced, are the Debug info set to Full? And is the DEBUG contant defined and the code not optimized (see [VS2015 Project no longer runs in debug mode](http://stackoverflow.com/questions/31992705/vs2015-project-no-longer-runs-in-debug-mode))? In [one of the answers](http://stackoverflow.com/a/32120639/1009922) to that post, the optimize option had to be set and then unset to actually remove it. – ConnorsFan Oct 06 '16 at 15:20
  • @ConnorsFan No luck, I went to Project Properties | Compile | Advanced options and checked and unchecked both those options.c Then cleaned and rebuilt in debug. Still same error of "no symbols loaded for this document" and my project .dll is not listed in the Debug | Modules window. – J King Oct 06 '16 at 15:33
  • There are a few other suggestions in [that post](http://stackoverflow.com/questions/31992705/vs2015-project-no-longer-runs-in-debug-mode), [one](http://stackoverflow.com/a/34445027/1009922) suggests disabling "Edit and continue", [another one](http://stackoverflow.com/a/34741402/1009922) mentions a Debuggable attribute in AssemblyInfo.cs. – ConnorsFan Oct 06 '16 at 15:39
  • @ConnorsFan thanks. I tried those as well. Disabled JIT as well as Edit and Continue, my vbproj file did not have the attribute mentioned in the assembly info. So frustrating, it worked until I updated VS to update 3 – J King Oct 06 '16 at 15:55
  • To ensure nothing wrong with VS 2015 Installation have you tried creating a new project and see if you are able to debug that ? – Ravi A. Oct 10 '16 at 03:53
  • @RaviA. its a bit complicated, This is a class library solution inside a web project solution. It uses templates for the project from here https://github.com/ChrisHammond/DNNTemplates. Debugging worked until the update. I have created other simple web projects and console applications and they all debug properly. – J King Oct 10 '16 at 15:49

1 Answers1

1

Are you able to attach directly to the w3wp.exe process, and if so are your breakpoints hit then?

  1. Menu > Debug > "Attach to process..."
  2. Check "Show processes from all users"
  3. Look for a process named "w3wp.exe", with the username "IIS APPPOOL\{IIS site name}"
  4. Click "Attach"
NJH
  • 387
  • 4
  • 18
  • see second comment above. Attaching directly does not work, it hangs the site so nothing works on it – J King Sep 30 '16 at 06:31
  • Have you tried closing Visual Studio, deleting the ".vs" folder in your solution directory and reopening the solution, to clear any cached user data? (Note: this will clear any of your breakpoints, you will need to re-add them) – NJH Sep 30 '16 at 07:05
  • Yes, I deleted the .vs folder and re opened the project - no chnage – J King Sep 30 '16 at 13:55