开发者

debug DLL in a different solution

开发者 https://www.devze.com 2022-12-14 17:58 出处:网络
I have an *.exe project that was written in one solution under vs2005 and i have a DLL file that the *.exe project is using.

I have an *.exe project that was written in one solution under vs2005 and i have a DLL file that the *.exe project is using. the problem is that the dll was written in adiffrent solution and when i try to make attach to the *.exe file (after i run it) from the dll solution in order to debug the dll , i get no symbols are loaded error (and i cant debug the dll)开发者_如何学JAVA altough symbols were loaded (i can see the *.pdb files that created after i compiled the dll solution) .

What can I do?


First check the Output window, it will show whether or not it could find debugging symbols for the DLL when it got loaded. Next, switch to Debug + Windows + Modules, right-click your DLL and choose "Symbol load information". That shows where the debugger looked for .pdb files for the DLL. Ensure the .pdb is located in one of these paths.

If the problem is not getting source code for the DLL instead of missing .pdb files, first delete the hidden .suo file in the solution directory. The next time you debug into the DLL, Visual Studio will again prompt you to provide the path to the source code file. Don't press Escape, enter the path. Another thing you can do is right-click the solution in the Solution Explorer window, Properties, Common Properties, Debug Source Files. Add the path to the DLL source code directory.


If you have the visual studio project that generates the dll, compile it in debug configuration and launch debug. You'll be asked for an executable ; select the one you have (from your other solution) and you'll be able to debug the dll.

Now if you want to debug both at once, i believe your way is correct, as long as the dll that the exe uses is the exact one that you've just compiled in your other solution. That might be the problem you're encountering.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号