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

Tech-Archive recommends: Speed Up your PC by fixing your registry



"Joachim" <Joachim@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0765B11E-8A77-4C3C-9377-AFDC0196958A@xxxxxxxxxxxxxxxx
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?

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


.



Relevant Pages

  • Re: How to debug? "No Symbols Have Been Loaded"
    ... Are you running/compiling your application in Debug mode? ... > I work with ASP.NET using VB and I'm trying to set a breakpoint on the ... > 'DefaultDomain': Loaded ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How to debug MFC or Win32 DLL ?
    ... > Just put breakpoint in dll project and run it in ... >> Should I write dump description myself for debug mode? ...
    (microsoft.public.win32.programmer.networks)
  • Re: Breakpoint not hit
    ... > another DLL. ... > wonder how one would specify which DLL the breakpoint is to be set in? ... (IMO this is the most error-prone moment in library debugging) ... * Check that the DLLs are built with debug information (default Debug configuration ...
    (microsoft.public.vc.language)
  • Re: Breakpoint not hit
    ... > another DLL. ... > wonder how one would specify which DLL the breakpoint is to be set in? ... (IMO this is the most error-prone moment in library debugging) ... * Check that the DLLs are built with debug information (default Debug configuration ...
    (microsoft.public.vc.debugger)
  • Re: Debugging a DLL from a web service
    ... Make sure that the referenced assembly was built in debug mode, ... the bin directory with the dll. ... I did add a reference to the project (via the Projects tab in the Add ... When I run the web service and click a button on a test page, ...
    (microsoft.public.dotnet.languages.csharp)