Debugging Unmanaged DLL With C# GUI .exe From VCPP 2003 Standard

M

Mark Jerde

I googled and found a half-dozen good threads on debugging C# / VCPP on a
machine with both tools installed. But my co-worker and I haven't figured
out how she can debug her C++ code on her computer when her DLL is called
from my C# GUI .exe program. I have the full MSDN Universal toolset, but
she just has VCPP 2003 Standard.

(This is probably very easy and well documented somewhere in MSDN... ;-)
But neither of us is very expert yet and our attempts yesterday were
unsuccessful.)

Thanks.

-- Mark
 
R

Rodrigo Corral [MVP]

Ensure that:

1) You have enabled unmanaged debugging in Project properties->Configuration
Properties->Debugging->Enable Unamaged Debugging in your managed project.
The default is false.

2) You have compiled your native dll in debug configuration.

3) You have the native dll's pdb in the same directory that you are
expecifiying in your DllImport attribute.


--
Un saludo
Rodrigo Corral González [MVP]

FAQ de microsoft.public.es.vc++
http://rcorral.mvps.org
 
M

Mark Jerde

Rodrigo -- Thanks! I will check these things in a few hours when I get to
work. I'll post back here if we still have problems.

-- Mark
 
M

Mark Jerde

We're now debugging. For future googlers, important information copied
below is from
http://www.dotnet247.com/247reference/msgs/45/225089.aspx

-- Mark


1. Run your application ( no debugger attached )
2. Open the task manager ( press Ctrl+Shift+Esc )
3. Right-click the process to be debugged.
4. Choose Debug.
5. Choose the correct instance of the IDE.
6. A messgae box will popup: set the 'Native' Check-box
7. Press Attach and set your break points.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top