Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / August 2006

Tip: Looking for answers? Try searching our database.

Debug a C++ DLL from a C# Windows app in VS.NET2005

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joachim - 15 Aug 2006 17:19 GMT
I have been trying to set breakpoints inside a C++ DLL and running a C#
application which calls the exported functions from the C++ DLL. However,
when I run my solution in debug mode it always says

"The breakpoint will not currently be hit. No symbols have been loaded for
this document."

where I haved placed the breakpoint.
In the properties of my C++ app (which is not managed by the way)
Configuration Properties -> Debugging -> Command I have set my C#
application. What more do I need to do?
William DePalo [MVP VC++] - 15 Aug 2006 17:29 GMT
>I have been trying to set breakpoints inside a C++ DLL and running a C#
> application which calls the exported functions from the C++ DLL. However,
[quoted text clipped - 7 lines]
> Configuration Properties -> Debugging -> Command I have set my C#
> application. What more do I need to do?

There are a few things that can bite you:

1) Make sure you have one and only one copy of the DLL that you want to
debug where the IDE is likely to find it

2) If you move it from the development directory, make sure you move the PDB
file as well

3) Make sure you have optimizations switched off

4) Make sure you haven't turned off native debugging support as might be the
case by default if you are debugging a C# project

Regards,
Will
Joachim - 15 Aug 2006 17:34 GMT
Thanks Will,

I just solved it myself. This is what I did:

Properties on the C# app
Debug -> Enable unmanaged code debugging
Start the C# app

Regards,
Joachim

> >I have been trying to set breakpoints inside a C++ DLL and running a C#
> > application which calls the exported functions from the C++ DLL. However,
[quoted text clipped - 23 lines]
> Regards,
> Will
William DePalo [MVP VC++] - 15 Aug 2006 18:22 GMT
> Thanks Will,

You are welcome.

> I just solved it myself. This is what I did:
>
> Properties on the C# app
> Debug -> Enable unmanaged code debugging
> Start the C# app

That's #4 on my list. Managed projects by default have managed debugging
enabled only.

Regards,
Will

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.