Debugger gets lost when tracing...Please help!

Has anyone else experienced the debugger (Visual C++ .NET 2003) getting lost or off track when tracing through a module that has OCC objects in the routines? Every now and then I will have a break point in my code, it will get hit, then I start tracing through the code but the debugger takes me a few line off from where the actual line of code it’s supposed to be on and even breaks on comments, and blank lines. It's very bizarre and it is very aggravating. Could it be OCC’s naming convention hxx, cxx, use of macors or inline functions? Any clues are welcomed, please help! Thanks.

Stephane Routelous's picture

usually, it is a problem that the pdb files (used for debugging and generated by the debug compilation) are not in sync with the source files. (pdb generated with cxx version n, but cxx file is version n+1)
Try to recompile OCC in debug and be sure that the pdbs are placed in the same directory as the dlls.

HTH,

Stephane

K Rutherford's picture

Hi Stephane,

I did recompile OCC in debug mode and have my app linking the libs from the newly created /libd directory. The dll and pdb file were both created in the bind directory. I do know for sure my app is linking in the /libd directory. How would I sync up the pdb files with my app? Thanks for your quick response and help.

-Kevin

Stephane Routelous's picture

try to check if no old OCC libraries are not in the PATH
you can also download http://www.dependencywalker.com/, load your executable in the DependencyWalker and check the path of the dlls.

HTH,

Stephane

K Rutherford's picture

That was it. Thank you so much for your help. My app wasn't using using the debug dll, I had to go into the environment variables and change the path to point to /bind and reboot my machine but after that the debugger is in sync. Great! Thanks again Stephane.

-Kevin