如何在Visual Studio中调试外部类库项目? [英] How to debug external class library projects in visual studio?

查看:355
本文介绍了如何在Visual Studio中调试外部类库项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目(A)引用来自位于另一个vs解决方案的外部项目(B)类库的程序集。



我还没有明白如何从项目A运行程序时可以从B高效地调试类库。有什么我必须在项目B上启用,例如调试信息等等,所以我可以从A调试时进入。



提前感谢。

解决方案

尝试禁用Just My Code(JMC)。




  • 工具 - >选项 - > Debugger

  • 取消选中启用我的代码



默认情况下,调试器尝试限制世界的视图代码只包含在您的解决方案中。这真的很有时候,但是当你想调试不在你的解决方案中的代码(如你的情况),你需要禁用JMC才能看到它。否则代码将被视为外部的,并且大部分隐藏在您的视图中。



编辑



当您的代码破裂时,请尝试以下操作。




  • 调试 - > Windows - >模块

  • 找到您感兴趣的项目的DLL

  • 右键单击 - >加载符号 - >选择您的其他项目的.PDB路径


I have a project(A) that references an assembly from an external project(B) class library that is located in another vs solution.

I have yet to understand how i can efficiently debug the class library from B while running the program from project A. Is there something i have to enable on project B such as debug info etc so i can step-into at debug time from A?

Thanks in advance.

解决方案

Try disabling Just My Code (JMC).

  • Tools -> Options -> Debugger
  • Uncheck "Enable Just my Code"

By default the debugger tries to restrict the view of the world to code that is only contained within your solution. This is really heplful at times but when you want to debug code which is not in your solution (as is your situation) you need to disable JMC in order to see it. Otherwise the code will be treated as external and largely hidden from your view.

EDIT

When you're broken in your code try the following.

  • Debug -> Windows -> Modules
  • Find the DLL for the project you are interested in
  • Right Click -> Load Symbols -> Select the Path to the .PDB for your other project

这篇关于如何在Visual Studio中调试外部类库项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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