Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

All the job is done by .pdb files because it maps the source code to instructions.

Ensure that pdb files match exactly (are generated from) your DLL. The debugger will not load a .pdb file that does not match exactly the executable being debugged. 2 executables could have same source code but different pdb.

In the IDE output window , check if .pdb files for opencv DLLs are loaded at start up. For each DLL used in the application you should see opencv_XXX.dll. Symbols loaded. If you see opencv_XXX.dll. Cannot find or open the PDB file your pdb files should stay

  • in the executable path or with application dll
  • where they have been created at opencv build time
  • in a path specified by IDE Tool>Options>Debugging>Symbol add a new symbol file locations

When the IDE can find the pdb files (the output shows opencv_XXX.dll. Symbols loaded) the debugger should work fine.

In case you can't locate the source code for OpenCV you have to check the path stored in the pdb files. To do this you need to dump info stored in pdb. You can do this using pdbInspector or The Dia2dump sample is installed with Visual Studio. Once you have built Dia2dump, run it Dia2dump -sf opencv_XXX.pdb > file.txt and inspect file.txt if sources path listed for opencv function are valid path.

More info from MSDN Specify Symbol (.pdb) and Source Files in the Visual Studio Debugger

I hope this helps

A bit OT but I hope this helps !

All the job is done by .pdb files because it maps the source code to instructions.

Ensure that pdb files match exactly (are generated from) your DLL. The debugger will not load a .pdb file that does not match exactly the executable being debugged. 2 executables could have same source code but different pdb.

In the IDE output window , check if .pdb files for opencv DLLs are loaded at start up. For each DLL used in the application you should see opencv_XXX.dll. Symbols loaded. If you see opencv_XXX.dll. Cannot find or open the PDB file your pdb files should stay

  • in the executable path or with application dll
  • where they have been created at opencv build time
  • in a path specified by IDE Tool>Options>Debugging>Symbol add a new symbol file locations

When the IDE can find the pdb files (the output shows opencv_XXX.dll. Symbols loaded) the debugger should work fine.

In case you can't locate the source code for OpenCV you have to check the path stored in the pdb files. To do this you need to dump info stored in pdb. You can do this using pdbInspector or The Dia2dump sample is installed with Visual Studio. Once you have built Dia2dump, run it Dia2dump -sf opencv_XXX.pdb > file.txt and inspect file.txt if sources path listed for opencv function are valid path.

path. For example on my computer Dia2dump -sf opencv_annotationd.pdb produces:

...
z:\libs\opencv\3.0.0\sources\opencv\apps\annotation\opencv_annotation.cpp (MD5: 668BA49F0E20B8C4C84F00A99DDAFFFA)
...

More info from MSDN Specify Symbol (.pdb) and Source Files in the Visual Studio Debugger

I hope this helps