Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

visual studio 2010 c++ debugging symbols loaded but can't find source code

I've specified symbol (pdb) file inside 2010 so that it is loaded correctly but I get the No source available error and the Browse to Find Source Code is greyed out. Does anyone know how I can specify the source code directory or look inside the pdb to find out where it is?

EDIT: My DLL is being called by an external program. The error is happening inside my DLL so I have the source code. When the error occurs I click Debug, the pdb symbols are loaded but not the source.

like image 895
probably at the beach Avatar asked Jan 27 '12 16:01

probably at the beach


1 Answers

If you moved the DLL from its build directory then the debugger is unlikely to be able to find the source code files itself. First thing you can do is to right-click the Solution root node in the Solution Explorer window, Properties, Common Properties, Debug Source Files and add the path to the DLL project source directory.

Second way: the debugger prompts you the first time it needs to find a source code file. If you ever clicked Cancel on that dialog, pretty common thing to do when you don't know what it is really asking, then the IDE remembers your selection and won't prompt you again. Fix that by deleting or renaming the hidden .suo file in the solution directory.

like image 77
Hans Passant Avatar answered Oct 20 '22 05:10

Hans Passant