Help with why project pdb will not load

Chris Powell 0 Reputation points
2023-03-21T20:43:36.05+00:00

Can you help me figure out why the debugger will not load the pdb file?

It says it cannot find it but I know it is in the same directory. See attached image.

I don't know what I did to the project setting that caused this.

I started over with a new project file and was able to get it to work. But I cannot figure out what my existing project has that causes it to not load. The DLL compiles and works fine it just will not let me debug it.

Thanks,

Chris

Developer technologies | C++
Developer technologies | C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
{count} votes

1 answer

Sort by: Most helpful
  1. Chris Powell 0 Reputation points
    2023-03-22T14:45:56.1266667+00:00

    I figured this out. For a DLL you must use the same directory for Output Directory and Intermediate directory:

    I made these the same and now it is working. (This is from Project Property file.)

      <PropertyGroup>
        <OutDir>$(SolutionDir)Build\$(Configuration)\$(ProjectName)\</OutDir>
        <IntDir>$(SolutionDir)Build\$(Configuration)\$(ProjectName)\</IntDir>
      </PropertyGroup>
    
    

    Also ending up have to make sure: (This is from Project Property file.)

          <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
    
    

    For the compile side.

    Link side is default as well.

    Compiler and Linker must have different names for "ProgramDataBaseFileName"

    I have not worked with DLL's as much. I have never had this problem before with static libraries are exe.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.