Bryan
Bryan

Reputation: 2138

Application using a DLL, but Visual Studio 2010 not showing it in Modules window

I feel like this is a stupid question, but I can't seem to figure out the answer. I've currently got a C++ application that's loading & utilizing a DLL (I compiled both the application & the DLL with VS 2010). I'm positive it's using the DLL, because a) if I rename the DLL, I get a not found exception, and b) it's displaying output that only comes from (and I can change it to see the output change) inside the DLL.

My problem is that in Visual Studio's Modules window while debugging, the DLL does not appear to be loaded. Because of this, obviously its got no symbols and I can't set breakpoints... But this doesn't make any sense to me as it's clearly using the DLL.

I've seen several other similar questions, and the answer has generally been too look at whether the code is native, managed, or mixed, and set the "Attach to Process" field accordingly. I've tried all the options there, and made sure my Debugger Type is set to "Mixed" (though I've tried it with Native & Managed as well, just to verify none of these solve the issue).

Does anyone have any suggestions?

Thanks in advance!

Upvotes: 1

Views: 2719

Answers (2)

budward
budward

Reputation: 41

This happened to me and I found the project->properties->Debug page and clicked the box to Enable native code debugging. I was doing a C# project accessing a C++ / native dll

budward

Upvotes: 4

Mahmoud Fayez
Mahmoud Fayez

Reputation: 3459

I have some ideas:

  1. check output windows it the DLL symbols are missing.
  2. Make sure dllname.pdb file exist beside the DLL
  3. make sure visual studio solution has two projects (EXE,DLL) projects
  4. switch to DEBUG mode instead of RELEASE mode.
  5. run process explorer (download it from MS) and check the path of the DLL that is bonded to the EXE in runtime.

Finally the ultimate solution:

  1. Open Process Explorer and search for your DLL name.
  2. Find which EXE is using it.
  3. Goto VS and attach your debugger to that EXE.

I hope any of those fix your issue

Upvotes: 0

Related Questions