C# debugging across dlls

2019-04-13 21:37发布

问题:

I have a project which has a calling structure similar to this:

  • main project/application
  • my library code
  • someone else's library code
  • my library code

Everything's written in C#, and I have access to 'someone else's library code'. Their code is not included in my project, because it's open source and not my code. I can make debug versions of all the libraries, and I've done so.

That 'someone else's library code (SELC, I guess?) is throwing an exception in a heisen-bug kind of way, and I'm trying to track it down and maybe submit a bugfix to the project maintainer. Problem is, my debugging stack is stopping at my library code, and lists the SELC as 'external' and I can't debug into it. I've copied the pdb files as well as the debug version of the library into the debug directory of my application, and still no luck; I can't seem to debug into their code, and I can't step into it at all.

Once upon a time, back in vs6 days, I could do this-- have two different projects open at the same time in two different environments, and have the debugger trace across dll boundaries from one project into another. I'd assume that functionality remains, because it's just so dang useful.

Any suggestions?

I've looked for this answer but not found it, so if this is a dupe, just let me know where to look.

回答1:

Do you have "Just My Code" turned on in Visual Studio's debugging options?



回答2:

If you have the sources (as i read from you), you can make an project with their source code, and then add the project to your solution.
In visual studio the project in .csproj file , and solutions in .sln file.



标签: c# debugging dll