Member Avatar for Zaina jee

When I write program in Visual Studio 2010, then error comes that "cannot find or open PDB file". Is their any solution of this problem?

If you rebuild the program VS will re-generate the pdb file in the same folder as the *.exe file. The default folder is either Debug or Release. If there are any compiler errors the *.pdf will not be generated.

The only time it is needed or used is if you start a debugging session, oterwise you can delete it.

Member Avatar for Zaina jee

I rebuild the solution and problem was resolved. But why this error comes because one day before when I rebuild and debugged my program it takes input and crash after that with the pdb file error message.

Sorry, I don't know the answer to that. Before you attempt to debug you have to make sure there were no compiler-reported errors. You should also resolve all the warnings that occur in the code you wrote (not the compiler's header files). The compiler will not generate the pdb file if there were errors in your program.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.