I\'m working with an ASP.NET MVC project that seems to be having some issues when attaching to the IIS process (w3wp.exe). I\'m running the solution and IIS 8.5 on my own lo
In my case the actual process was different from the original started process.
Usually we bind the local-hosted services through the w3wp.exe
process. In my case a custom process was used. Changing to that solved the problem.
One more thing, change from Release to Debug mode. In release mode PDB files are not getting updated with breakpoints details. So make sure you are debugging your application in Debug mode.
Go to Visual Studio Menu:
Debug -> Attach to Process
And then click the Select button, as in the image below:
Then make sure the "Automatically determine the type of code to debug" option is selected, like this:
Right click on your project, then left click Properties, and select the Web tab. Debuggers > ASP.NET
In Visual Studio 2017 you need to make sure you're not in release configuration mode.
One of my projects in my solution was set to Release mode. I changed it back to Debug mode, and the breakpoints are hitting now.
If any of your components are Strong Named (signed), then all need to be. If you, as I did, add a project and reference it from a Strong Named project/component, neglecting to sign your new component, debugging will be as if your new component is an external one and you will not be able to step into it. So make sure all your components are signed, or none.