Visual Studio中:调试引用的DLL,我在另一个SLN源 [英] Visual Studio: Debugging a referenced DLL, I have source in another SLN

查看:622
本文介绍了Visual Studio中:调试引用的DLL,我在另一个SLN源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图要调试到我增加了一个DLL的引用的一个项目,该DLL存储在外部目录,我只是增加了一个参考。现在,我当然可以调试我的项目,但要求我的其他DLL的方法,我不能踏进去,即F12就行了。

I am trying to debug a project that has a reference to a DLL that I added, the DLL is stored in an external directory and I just added a reference. Now of course I can debug my project but the line that calls a method on my other dll I can't step into it, i.e. F12.

的一种方式,我能够要做到这一点是我的项目(​​DLL)作为现有项目添加到我的解决方案和替换引用的DLL来使用附加的项目,而不是磁盘上的文件。

One way I was able to do this was to add my project (dll) as an existing project to my solution and replace the referenced dll to use the attached project rather than a file on disk.

但是,什么乱七八糟的,我肯定有一个更清洁的方式?

But what a mess, I am sure there is a cleaner way?

我似乎记得,如果我复制一些PDB文件或东西,但我不记得。我还需要打开Visual Studio中,1 2份为我的主要项目和1个为我引用的DLL ??

I seem to remember if I copy some PDB files or something but i can't remember. And Do i need to open 2 copies of visual studio, 1 for my main project and 1 for my referenced DLL??

推荐答案

重建自己的机器(以便在PDB该文件路径是特定于您的计算机)上在调试模式下的第二个解决方案。

Rebuild the second solution in Debug mode on your own machine (so that file paths in that PDB are specific to your machine).

复制两个该.dll和.pdb文件到您的参考文件夹中。 Visual Studio将自动拿起.PDB文件,并使用文件路径显示源。

Copy both the .DLL and .PDB files to your references folder. Visual Studio will pick up the .PDB file automatically and use the file paths to show source.

您也可以使用符号服务器和源服务器实现这一目标时,引用的程序集在其他地方建: http://msdn.microsoft.com/en-us/library/vstudio/ ms241613.aspx

You can also use Symbol Server and Source Server to achieve this when the referenced assembly is built elsewhere: http://msdn.microsoft.com/en-us/library/vstudio/ms241613.aspx

这篇关于Visual Studio中:调试引用的DLL,我在另一个SLN源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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