How do I debug a referenced DLL in Visual Studio?

My team has built an assembly and there seems to be a problem in it.  The assembly is just referenced in my main project.  What are the steps, if any, to debug this from my main project?
LVL 1
BruceAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jacques Bourgeois (James Burger)PresidentCommented:
First of all, add the dll project to your testing project through File...Add...Existing Project.

In the References window, instead of referencing the dll as you do with most dlls, go into the Solution or Projects tab (depending on your version of Visual Studio) and select your dll project instead of the dll itself. This is akind to referencing the source code.

The debugger will then be active in both the testing application and the dll, switching from one project to  another as necessary, even if you debug step by step.
0
SammyCommented:
Rebuild the problematic project in Debug mode on your own machine (so that file paths in that PDB are specific to your machine).

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

If you don't have the code, you can use .Net Reflector (It's commerical now) http://www.red-gate.com/products/dotnet-development/reflector/
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
käµfm³d 👽Commented:
Rebuild the problematic project in Debug mode on your own machine (so that file paths in that PDB are specific to your machine).
This is very important. The .pdb files have to be the ones generated at the time of the build. Even if you have a set of .pdb files that exactly match in source code, if they were not from the same exact build, then you won't be able to use them.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.