Debug C ++ dll from C #

I will briefly tell you about the situation. I got a C # project that uses some DLL created in C ++.

Now, separately, I also have a C ++ project that was used to create this DLL some time ago. Now I wanted to debug the C ++ DLL while starting the C # project.

I included "Enable Unmanaged Code Debugging" in my C # project.

I started debugging a C # project and entering into some functions together. Everything seemed to be in order. When I reached the function that belonged to the C ++ DLL, he asked for the source of the C ++ file, I had to go to my C ++ project. (Before I think he complained about some .pdb files).

Now I also managed to get into the C ++ function, but as I go over many times, some data structures in this function do not seem to be populated with data, for example, see screenshot below

enter image description here

You can see that the blob data structure is empty, and the same thing happened with DataParser(it showed that it had 0 elements inside, whereas in the code above you can see that several elements were added to it).

I would really appreciate help, what is going wrong here? And where could I be wrong. How can I debug this C ++ DLL to also see what values ​​are now assigned to its variables?

, ++ DLL ? , # DLL, ++, DLL - , , , - ?

PS , ++ , VS2012 (, VS2013, , , ). ++. , , - ?

DLL ++ , ?

EDIT: PPS. . F11 ( ) DataParser.Add, , , , ( - ).

, F10, Request.Add Request.Add , , .

EDIT2: , ++, , " , DLL". ?

+4
1

PDB

(.dll/.exe) (.pdb). , . Visual Studio , .

, WinDbg, , Visual Studio ( Chkmatch), checmsum. , .

PDB

(.pdb) . . , , , .

, , . , . , :

  • , , , , .
  • , , , 80 , .
  • (R #), 30 ,

  • , .
  • , PDB. , , (, )
  • , . , .
+1

Source: https://habr.com/ru/post/1610258/


All Articles