Kottan
Kottan

Reputation: 5076

Debugging COM libs in .NET (Visual Studio 2010)

I use a COM library (3rd party) with interop in a C# application. How can I debug objects of this library in VS2010? Or is this not possible?

Upvotes: 1

Views: 1705

Answers (2)

Gogorrr
Gogorrr

Reputation: 59

To enable debugging of COM dlls you have to do the following:

Projects Settings of the .NET Project -> Debug -> "Enable unmanaged code debugging" has to be selected

Now you can attach an unmanaged debugger/debug into unmanaged dlls.

To step into the source of the dll you need the appropriate pdb files and source files.

Upvotes: 2

Hans Passant
Hans Passant

Reputation: 942448

A similar question would be "how do I debug my operating system". You don't, you keep your fingers crossed that it will give you a decent error code and message when you use it improperly. Even if you do find a bug in the library, there's nothing you can do about it unless you have the source code and the right to rebuild it.

Review the license agreement you've got to use this library for support options.

Upvotes: 4

Related Questions