Home Dashboard Directory Help
Search

Can't debug unmanaged code from managed project by BetterToday


Status: 

Closed
 as External Help for as External


0
1
Sign in
to vote
Type: Bug
ID: 351684
Opened: 6/18/2008 2:52:07 AM
Access Restriction: Public
1
Workaround(s)
view
0
User(s) can reproduce this bug

Description

Hi,

I've created an unmanaged C++ DLL containing C-style functions to be called from a managed project.

Although I've declared everything correctly, the debugger doesn't stop at any breakpoint I've set in the DLL.

Step-In doesn't work as well. The debugger just steps over the calls from my C# project, declared with DllImportAttribute.

This is very frustrating as I can't debug to check whether I've given correct function arguments.

Axel Dahmen
Details
Sign in to post a comment.
Posted by BetterToday on 6/18/2008 at 3:56 PM
Hi B,

thanks for trying to help! I've got the right tip from the newsgroups. I added it to the comments section above.

Regards,
Axel
Posted by BetterToday on 6/18/2008 at 3:55 PM
Got a helpful reply from the newsgroup:

"Go to Debugging category in the project settings and enable both native and managed code debugging."

Unfortunately I can't close this issue myself.
Posted by Bekende on 6/18/2008 at 11:26 AM
Try setting the DLL project as the startup project (right-click on the dll project -> set as startup project). You must copy the C# executable to the dll output directory. Hit F5 and point to the copied executable. This is how I do it. It's more like a workaround, so let's hope they (can) fix it.
B
Sign in to post a workaround.
Posted by BetterToday on 6/18/2008 at 3:52 PM
Go to Debugging category in the project settings and enable both native and managed code debugging.