本文介绍了尽管存在pdb文件,但Resharper不会导航到外部源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  • 我的解决方案使用其他解决方案生成的.dll中的类
  • .dll在同一台计算机上以调试模式生成时,存在pdb文件
  • 在调试过程中进入这些外部源,所以我假设pdb文件是正确的
  • pdp文件与.dlls位于同一目录
  • 在R#设置中,我选择了导航到源"和使用调试信息进行导航检查"
  • VS2012 Pro和R#8.02 Full
  • 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

这让我发疯,为什么在每一个通用的Java免费IDE中都提供了如此关键的东西,却无法使用数百美元的工具在C#中工作...

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...

推荐答案

查看要点中的转储发布,我看到的第一个问题是PdbCacheManagerImpl的空白部分.这是ReSharper知道的pdb列表.这不应该是空的. 一个已知错误可能导致该错误为空.尝试关闭并重新打开解决方案,以查看是否再次启动该解决方案.

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.

类似地,您的PdbServiceImpl部分中的程序集不包含有关pdbs的任何信息.我认为这与PdbCacheManagerImpl有关-由于ReSharper不了解pdb文件,因此未在此处列出.工作时,它将显示与程序集相关的pdb文件,以及pdb中所有符号的列表以及它们映射到的文件.

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.

(我可以通过创建一个新的解决方案来重新创建它-转储在本节中不显示任何内容.关闭并重新打开,它显示已知的dll,带有标志来说明它们是否支持源服务器以及它们是否包含符号之间的映射(类型)和源文件.关闭并重新打开后,我可以下载并查看例如Console.WriteLine的源,而PdbServiceImpl在mscorlib pdb中具有System.Console的条目)

(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)

第二,您没有在选项中启用允许从远程位置下载".这只会影响您从符号服务器下载pdb文件,它不应阻止dll旁的pdb的工作.不过,您将需要启用它才能导航到Console.WriteLine的来源.

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.

因此,不幸的是,我现在的建议是关闭并重新打开解决方案,然后重试.您可能遇到了已知的错误,解决此问题的唯一方法是关闭然后重新打开.重新打开后,请尝试再次导航,然后再次尝试转储支持信息-您应该在PdbCacheManagerImpl中看到更多的pdb,在PdbServiceImpl部分中看到了已知符号的列表.

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.

这篇关于尽管存在pdb文件,但Resharper不会导航到外部源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 07:51