Debugging of native code

Posted by graham.reeds on Stack Overflow See other posts from Stack Overflow or by graham.reeds
Published on 2010-03-26T11:32:03Z Indexed on 2010/03/26 11:53 UTC
Read the original article Hit count: 299

Filed under:
|
|
|
|

I have a C# Service that is calling a C DLL that was originally written in VC6.

There is a bug in the DLL which I am trying to inspect.

After having a nightmare trying to get debug to work I eventually added the dll to the VS2005 solution containing the C# Service and added the necessary _CRT_SECURE_NO_WARNINGS.

The debug version of the service is registered using 'installutil.exe' tool.

I can get the debugger to break just before the line where the dll is entered via a call to System.Diagnostics.Debugger.Break();.

I found some instruction on the net regarding stepping into debugging unmanaged code, and enabled the 'Enable unmanaged code debugging' check box, I've also tried turning on the Options->Debugging->Native 'Load DLL exports' and 'Enable RPC Debugging' (even though it's not COM). I've also copied the debug dll and .pdb to the same bin directory as the

However the unmanaged code is not being stepped into which is what I really need.

UPDATE: I found the Debugging Type in the DLL properties and set it to 'Mixed' as per suggestion on several sites but to no avail.

© Stack Overflow or respective owner

Related posts about c#

Related posts about service