Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I debug this error: 'Debugging information for iisexpress.exe cannot be found or does not match'?

I've been working on an MVC 5 code first project for a few months and (seemingly) out of nowhere, Visual Studio is refusing to debug and giving me some strange errors.

When I try to run the application Ctrl+F5 it builds ok but the browser never gets beyond the loading stage, I still have the pinwheel in the browser tab, but the app never loads.

When I try to debug the applicaiton F5 it builds ok, but then comes up with 2 errors, firstly Debugging information for iisexpress.exe cannot be found or does not match. Cannot find or open the PDB file. and then Process with an Id of xxxx is not running.

I've tried loading symbols from MS (https://stackoverflow.com/a/8138518/1778169), using a different database name, uninstalling VS extensions, performing all Windows Updates, repairing the VS installation and even reinstalling VS entirely. Nothing seems to help.

I'm not very familiar with PDB files, but I have done nothing knowingly to change this, and they seem to be in the right place:

enter image description here

I am running out of ideas, but really want to avoid a Windows reinstall if possible.

It's only happening in this one project, so the problem would seem to be with the project itself, not the installation. But I have no idea where to start debugging this problem, or looking for a solution.

Possibly Relevant

I tried running the app on a custom domain (set up in the hosts file and IIS Express's ApplicationHosts.config file). In an attempt to solve this problem I reverted these settings back to the default localhost:[port]. This doesn't seem to have made any difference, but thought I should mention it just in case.

like image 369
Martin Hansen Lennox Avatar asked Feb 14 '15 20:02

Martin Hansen Lennox


1 Answers

My problem was that the Native Code box was ticked in the Debuggers section of the Web section in Project Properties.

I don't know how this came to be ticked, I certainly never ticked it.

Either way, unticking this box solved my problem.

enter image description here

like image 103
Martin Hansen Lennox Avatar answered Oct 31 '22 03:10

Martin Hansen Lennox