title: Debugger does not step into native code when debugging a static lib wrapped in a C++/CLI DLL
body: <p>In a C# app, I'm referencing a native C static lib, that I wrapped in a C++/CLI DLL. I chose a static lib versus a DLL because I have other constraints related to the release process of the app to the user. Among the many topics available on this forum I found the following implementation.</p>
  
  <p>Main :</p>
  
  <pre><code>{
    MyCLRDLL test = new MyCLRDLL();
    if(test.go()) Console.WriteLine("Hello, wrld");
  }
  </code></pre>
  
  <p>In the DLL project, the file <strong>MyCLRDLL.hpp</strong></p>
  
  <pre><code>#include "MyNativeLib.h"
  #pragma comment(lib, "MyNativeLib.lib")
  namespace InteropTest {
  public ref class MyCLRDLL
  {
    CMyNativeLib* mInt ;
    public:
      MyCLRDLL()  { mInt = CMyNativeLib_New() ;} ;
      ~MyCLRDLL() { CMyNativeLib_Delete(mInt) ;} ;
      bool go() { return mInt-&gt;areYouThere()  ;} ;
  };
  }
  </code></pre>
  
  <p>And in the native project, <strong>MyNativeLib.h</strong></p>
  
  <pre><code>namespace InteropTest
  {
  class __declspec(dllexport) CMyNativeLib
  {
  public:
    CMyNativeLib() {};
      ~CMyNativeLib(){};
    bool areYouThere() ;
  } ;
  extern "C" __declspec(dllexport) CMyNativeLib* CMyNativeLib_New();
  extern "C" __declspec(dllexport) void CMyNativeLib_Delete(CMyNativeLib* pLib);
  }
  </code></pre>
  
  <p>and <strong>MyNativeLib.cpp</strong></p>
  
  <pre><code>#include "MyNativeLib.h"
  namespace InteropTest {
  extern "C" __declspec(dllexport) CMyNativeLib* CMyNativeLib_New(){return new CMyNativeLib() ;}
  extern "C" __declspec(dllexport) void CMyNativeLib_Delete(CMyNativeLib* pLib){delete pLib;}
  bool CMyNativeLib::areYouThere() { return true ; }
  }
  </code></pre>
  
  <p>The debugger is not stepping into mInt->areYouThere() function. Why is that so? Breakpoints in the native part are not caught either.</p>
  
  <p>Symbols are loaded for MyCLRDLL, "Enable unmanaged code debugging" is active on C# project, "Debugging/Debugger Type" is set to Mixed for both C projects and in the general options, most relevant things seem checked.</p>
  
  <p>Does it mean that the MyCLRDLL.pdb file does not contain the debug information from the lib code? How to check?</p>
  
  <p>(possible same question as unanswered <a href="https://stackoverflow.com/questions/13324341/debugging-an-unmanaged-c-static-lib-included-in-a-clr-dll">Debugging an unmanaged C++ static lib included in a CLR .dll</a>)</p>