I have created a visual c++ 6.0 dll
project and using it from my c#
code. Now i want to debug the dll
but i am not able to do it.
I choose the following option to do it:
visual c++
project code.c#
project.c#
project and dll works fine (method are calling perfectly).dll
. c++
project and choose the Attach to process
from vc++
.visual c#
project, whereas it available at task manager process.In my c#
project solution i have two project i.e.
webform application
which starts the web services.Now please help me how should i debug my dll. I have followed so many blogs but all of them are focusing on Attaching process
method which is not working in my condition. What should i do?
You'll need to enable unmanaged debugging, it is not turned on by default in either scenario because your main program is managed.
You do it in your C# project with Project > Properties > Debug tab > tick the "Enable unmanaged code debugging" checkbox.
You do it with Tools > Attach to Process by clicking the Select button. Choose the "Debug these code types" radio button and tick both Managed and Native. You may have to resort to only native if your process is 64-bit.
Set a breakpoint in the DLL's source code and be sure to write C# code that exercises the DLL function. If you still have trouble getting a breakpoint then use Debug > Windows > Modules and verify that you see the DLL in the module list. Get additional troubleshooting info by right-clicking it, select Symbol Load Information. Which shows a trace of where the debugger looked for the PDB file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With