3

Is it possible to step into the COM C++ code that is being used through a .net interop layer created by tlbimp.exe from a C++ program. I see that the symbols for the COM C++ dll is loaded in the Debug->Modules window.

TrustyCoder
  • 4,749
  • 10
  • 66
  • 119
  • 1
    No, the debugger doesn't allow stepping into code that switches from managed to native code execution, or the other way around. You will need to set a breakpoint on called method. Enable unmanaged debugging in a C# exe project to allow that to work, mixed mode in a native project. – Hans Passant Jun 05 '12 at 12:57
  • Also as a reminder double check the code types in the "Attach to Process" dialog then set the "Attach to" field manually by selecting the Managed and Native code types in the checkboxes. See http://stackoverflow.com/questions/2519603/debugging-unmanaged-code-while-debugging-managed-code and look for Raphaël Saint-Pierre's comment on the accepted answer for reference. – Jerameel Resco Jul 23 '15 at 08:50

1 Answers1

7

It is possible, but you'll need to set your Visual Studio debugger to mixed mode in project properties. This is located under Project properties->Configuration Properties->Debugging->Debugger Type

Sergey Kudriavtsev
  • 10,328
  • 4
  • 43
  • 68