无法调试项目 [英] Can't debug project

查看:55
本文介绍了无法调试项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,正如上面的主题我想问你..我要调试我的项目时遇到问题. Vistual Studio找不到项目之一(dll)的源代码. 模块"窗口未显示任何错误,它显示了为正确的文件和正确的位置加载了符号.我也知道该exe实际上正在使用Modules中列出的确切文件,因此我有多个dll文件不是问题.但是VS仍然无法理解源代码在哪里.但是,我可以在反汇编中看到函数名称(这些函数以蓝色文本显示,并且格式为"Class :: Function:"),因此我可以手动找到对应的源代码.但是VS应该可以为我完成这项工作,现在调试时间要长十倍.我尝试启用选项>调试>原生>加载DLL导出,但这没什么区别,我不明白为什么要这样做,因为VS认为它已加载符号(pdb文件).谁能理解此问题的发生方式?我还尝试清理该项目(并仔细检查所有文件均已删除),然后重新生成它,但这也没有任何区别.而且我实际上也有源代码,因此它不是从外部库中自然无法找到源代码的一个奇数函数,我可以确定反汇编到源代码的行就在项目中.

有人确切地知道它. :(:confused:

Hi all, as the topic above i wanna ask you.. I have problem when i want to debug my project. Vistual Studio can''t find the source code for one of the projects (a dll). The Modules window show no errors, it shows that the symbols are loaded for the right file and for the right location. I also know that the exe is actually using that exact file that is listed in Modules, so it''s not the problem that I have multiple dll files. But VS still can''t understand where the source code is. However, I can see the function names in the Disassembly (the functions are shown with blue text and are of the form "Class::Function:"), so I can kind of manually find my way to the corresponding source code. But VS is supposed to do that job for me, now debugging takes ten times longer. I tried enabling Options > Debugging > Native > Load DLL exports but that made no difference, and I don''t see why it should since VS thinks it loaded the symbols (the pdb file). Can anyone understand how this problem occurs? I also tried cleaning the project (and double check that all files were removed), and the rebuild it, but that made no difference either. And I also actually have the source code, so it''s not one odd function that is linked in from an external library that it naturally can''t find the source code for, I can identify the lines the the Disassembly to the source that is right there in the project.

Somebody exactly know about it.. ?? :( :confused:

推荐答案

程序集副本也存在于GAC中吗?可能是这种情况.
Is the assembly copy present in GAC too? That might be the case.


有吗?您的代码中将重定向到某些页面的任何try-catch块...删除try-catch块,然后替换更新的dll ...这可能有用.
Is there any try-catch block in your code inside which you are redirecting to some page...remove the try-catch block and then replace the updated dll...This might work.


它听起来您的项目中使用了一个dll,但该项目未驻留在解决方案中.在这种情况下,VS不知道源代码在哪里.您可能有多个生成完全相同的程序集名称和版本的解决方案. br/> 因此,如果来自运行中的解决方案中未积极参与的项目的dll引发异常,它将要求您将其引导至代码.如果不这样做,它将在您调用dll的那一行显示dll中生成的错误.
如果确实将其指向代码,那么您将看到在dll中实际引发异常的位置.
It sounds like you have a dll being used in your project but the project does not reside in the solution. In this case VS does not know where the source code is. You could have multiple solutions that generate the exact same assembly name and version.
So in the case that the dll which came from a project that is not actively in your running solution throws an exception, it will request you to guide it to the code. If you do not, it will show the error generated with in the dll at the line you called into the dll.
If you do point it to the code, then you have the advantage of seeing where in the dll it actually threw an exception.


这篇关于无法调试项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆