greenman

Hi,
I am currently trying to debug a dll that I wrote. The dll must be in a very specific directory, the program searches for dll's in that directory and accesses those dll's through general functions that all the dll's have. I have therefore redirected the output of VS.2005 to that directory. Also I have redirected the intermediate files to that directory. Yet when I debug the program I can not stop at my breakpoints and I get the message that I mentioned above.
I've been told that debugging dll's is hard and I've been shown a way to debug dll's through the Task Manager. However, I can't believe that it is possible to do debug my program through the task manager and not with VS.2005.
Can anybody help
Thanks,
Greenman


Re: Visual Studio Debugger The breakpoint will not be currently be hit. No symbols have been load for this document.

JimGries - MSFT

You need to make sure that the corresponding PDB file is copied alongside your DLL. If your DLL is named "MyLibrary.DLL" then you need to have a "MyLibrary.PDB" (that was built at the same time) in the same directory.

There is no such thing as debugging from the Task Manager. You can START debugging a process from the task manager, but that will just cause a debugger (Visual Studio or WinDbg) to start debugging whatever process you chose.






Re: Visual Studio Debugger The breakpoint will not be currently be hit. No symbols have been load for this document.

greenman

I have redirected all the output of Visual Studio to that directory. Also all the intermediate file.
This has not helped.

Regarding :
"There is no such thing as debugging from the Task Manager. You can START debugging a process from the task manager, but that will just cause a debugger (Visual Studio or WinDbg) to start debugging whatever process you chose."
My thoughts exact, I told that person, it would be illogical to be able only to start the via the task manager and not from Visual Studio.
Thanks,
Greenman




Re: Visual Studio Debugger The breakpoint will not be currently be hit. No symbols have been load for this document.

Monica Boris - MSFT

Hi Greenman,

Have you checked that there is a corresponding .pdb file in that directory that has the same time stamp as your dll If so, what happens you you try to load the symbols for your dll from Debug | Windows | Modules by right-clicking on the dll and choosong Load ymbols from the contexty menu (you might be prompted for the actual location of the pdb file).

Thanks,

Monica Boris

VS Debugger Team





Re: Visual Studio Debugger The breakpoint will not be currently be hit. No symbols have been load for this document.

greenman

Hi Monica,
Thanks for the help. Your advice has not (yet) solved the problem.
The files do have the same time stamp. I can see that my symbols(my_file.dll) are not loaded witht the rest of the program.
This does surprise me somewhat:
The program(host) that I am running was written in .net(C# to be precise) and loads dlls at runtime. However, the solution that I am running the debug from is the solution with my_file.dll . I would expect it to load my symbols. I am missing something
Regarding Debug | Windows | Modules, my module does not appear in the list of files.
Thanks,
Greenman




Re: Visual Studio Debugger The breakpoint will not be currently be hit. No symbols have been load for this document.

Monica Boris - MSFT

Hi Greenman,

Thanks for the details. Let me see if I understand your scenario. The solution that you have open in VS is my_file.dll. I suppose that in the Debug page of project Properties you have specified the exe that loads this dll as the starup program. When you F5 you are debugging this exe. The fact that you don't see my_file.dll in the Modules window tells me that either your dll is not successfully loaded by the host program (can you please verify that this is not the case by exercising some of the funcitonality in the dll ) or that the program loads the dll at a later time. Once you have ensured that some of the dll code has been executed (hence the dll must be loaded at this time) check the modules window again. Can you see the my_file.dll now If so, try to load symbols for it. Does the Modules window show Symbols loaded for it/ If not, did you get an error message when trying to load the .pdb file If you don't see the dll in the Modules window, there is something really weird going on... Maybe your dll is loaded by a different program, could it be a serviced dll (i.e. a dlll that is loaded into dllhost ). Or, could it be that you are attached to more than one program right-click in the Modules window 9but not on a module0 and choose Show Modules from all Programs if that is the case.

Thanks,

Monica Boris

VS Debugger Team