How to debug a dll? 
Author Message
 How to debug a dll?

I have made a win32-dll (non-MFC) and want to debug it. I've compiled the
main program and the dll with /DEBUG option and set the path to symbol files
(.pdb) of the dll. But when I set a breakpoint in the dll, it's marked as
"?" (the code is not loaded) and the program doesn't stop. What do I do
wrong?


Fri, 27 May 2005 20:49:30 GMT  
 How to debug a dll?

Quote:

> I have made a win32-dll (non-MFC) and want to debug it. I've compiled the
> main program and the dll with /DEBUG option and set the path to symbol files
> (.pdb) of the dll. But when I set a breakpoint in the dll, it's marked as
> "?" (the code is not loaded) and the program doesn't stop. What do I do
> wrong?

Start the de{*filter*} when the DLL is the active project, not when the main
program is the active project.  

--
Scott McPhillips [VC++ MVP]



Sat, 28 May 2005 07:23:35 GMT  
 How to debug a dll?
What version of VC++ are you using?  If you are using VC6, then you need to
specify the DLL in the "Additional DLLs" section for the exe's project
settings (Project->Settings->Debug->Category->Additional DLLs).

If you are using VC7.0, then this will happen automatically.

--
Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.


Quote:
> I have made a win32-dll (non-MFC) and want to debug it. I've compiled the
> main program and the dll with /DEBUG option and set the path to symbol
files
> (.pdb) of the dll. But when I set a breakpoint in the dll, it's marked as
> "?" (the code is not loaded) and the program doesn't stop. What do I do
> wrong?



Sun, 29 May 2005 03:45:03 GMT  
 How to debug a dll?

Quote:
> If you are using VC7.0, then this will happen automatically.

I use VC++7.0 but this doesn't happen automatically :(. It happens only if I
copy pdb-file of the dll to the directory where exe-file lies. I've tried to
add the directory of the pdb-file to the PATH environment varialble but it's
no use. Tell me please what paths I must set.

--
_______
Gruss Ilia



Tue, 31 May 2005 06:30:41 GMT  
 How to debug a dll?
Quote:
>Tell me please what paths I must set.

There is a "Symbol Path" option in the Debugging Properties where you can
specify the pdb directories.
Please see:
"Project Settings for a C or C++ Debug Configuration"
http://www.*-*-*.com/
Settings_for_a_Debug_Build.asp

Hope this helps.

Thank you,
Bobby Mattappally
Microsoft VC++/C# Team

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

Quote:

>Newsgroups: microsoft.public.vc.de{*filter*}
>Subject: Re: How to debug a dll?
>Date: Thu, 12 Dec 2002 23:30:41 +0100

>> If you are using VC7.0, then this will happen automatically.

>I use VC++7.0 but this doesn't happen automatically :(. It happens only if
I
>copy pdb-file of the dll to the directory where exe-file lies. I've tried
to
>add the directory of the pdb-file to the PATH environment varialble but
it's
>no use. Tell me please what paths I must set.

>--
>_______
>Gruss Ilia



Tue, 31 May 2005 07:38:39 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. How to debug VC6 dll from C# client ?

2. Impossible to debug a DLL in step by step

3. How to debug a DLL loaded by a WinNT service

4. WIN2K: Can't debug a DLL loaded by a service

5. Howto debug a DLL that kicks off from an EXE

6. Urgent: How to debug my DLL

7. Source level debugging (again) - dll

8. Source Level Debugging - ActiveX dll

9. How to debug my dll

10. How to Debug a DLL

11. How to Debug Regular DLL Statically Linked to MFC

12. How to debug Addin DLL?

 

 
Powered by phpBB® Forum Software