Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

debugging - How to debug external class library projects in visual studio?

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?

Question&Answers:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Try disabling Just My Code (JMC).

  • Tools > Options > Debugging
  • 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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...