Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resharper does not navigate to external sources despite pdb files present

  • My solution uses classes from .dlls generated by my other solutions
  • .dll where generated in debug mode on the same machine, pdb files are present
  • steeping into those external sources during debugging works, so I am assuming pdb files are correct
  • pdp files are in the same directory as .dlls
  • In R# settings I have "Navigation to Sources" selected and "Use debug information for navigation checked"
  • VS2012 Pro and R# 8.02 Full

It drives me crazy, how come such crucial thing, that is provided out-of-the-box in every common free IDE for Java, is impossible to get to work in C# using tools for hundreds of bucks...

like image 588
Kranach Avatar asked Oct 20 '22 13:10

Kranach


1 Answers

Looking at the dump in the gist you posted, the first issue I can see is the empty section for PdbCacheManagerImpl. This is the list of pdbs that ReSharper knows about. This shouldn't be empty. There is a known bug that can cause this to be empty. Try closing and reopening the solution to see if that kicks it off again.

Similarly, the assemblies in your PdbServiceImpl section don't include any information about pdbs. I think this is related to the PdbCacheManagerImpl - since ReSharper doesn't know about the pdb files, it doesn't get listed here. When it's working, it should show the pdb file related to the assembly, plus a list of all symbols in the pdb, and the file(s) they map to.

(I can recreate this by creating a new solution - the dump shows nothing in this section. Close and reopen and it shows known dlls, with flags to say if they support source servers and whether they contain a map between symbols (types) and source files. After closing and reopening, I can download and see source for e.g. Console.WriteLine, and the PdbServiceImpl has an entry for System.Console in the mscorlib pdb)

Secondly, you don't have "Allow downloading from remote locations" enabled in your options. This will only affect you for downloading pdb files from symbol servers, it shouldn't stop things working with pdbs next to dlls. You will need it enabled to navigate to source of Console.WriteLine, though.

So, unfortunately, my advice right now is to close and reopen the solution, and try again. You might be hitting the known bug, and the only way to work around this is to close and reopen. Once you've reopened, try navigating again, and try dumping the support information again - you should see more pdbs in the PdbCacheManagerImpl and a list of known symbols in the PdbServiceImpl section.

like image 91
citizenmatt Avatar answered Oct 23 '22 04:10

citizenmatt