Breakpoint not hitting- How to troubleshoot

2017-01-14

Check the location of debug symbols(Debug>Module) of the assembly & verify it's picking from location has the latest dll file version. The location of the assembly probably will be "Temporary ASP.NET Folder" for web applications. And check the "Symbol load Information" against the assembly from the Module window which shows where the assembly is looking for the debug symbol file. This file should match with the dll, then only break point will hit in debug mode. If it cannot find matching PDB file, then check the assembly in the "Temporary ASP.NET Folder" is the one which is latest one you just build.  You can do check by looking at timestamp of each assemblies, if not matching then it's not then it's the old assemlby somehow copied to this "Temporary ASP.NET Folder" & that is making this issue. So we need to find out why this happend i.e. why the lates DLL file is not copied to "Temporary ASP.NET Folder". To find out this, check for a search of this assembly for its duplicates, you should find somewhere in the IIS you have hosted its duplicate!. Delete this duplicate & now clear the "Temporary ASP.NET Folder" & now debug must work.

 Note the location of PDB file is added in the assembly of the project itself. So this check for matching of PDB file if failed is itself hinting that the assembly you just build is not the one present in the "Temporary ASP.NET Folder"

0 comments: