debugging information cannot be found or does not match visual studio's

后端 未结 14 1583
醉酒成梦
醉酒成梦 2020-11-29 04:11

I copied an existing project and renamed the folder. Now I get this error when I try to compile the application

debugging information cannot be found

相关标签:
14条回答
  • 2020-11-29 04:49

    The pdb or Program Database file appears to be missing (basically, the path has changed and can no longer be found by the compiler). See this related post for additional information.

    0 讨论(0)
  • 2020-11-29 04:49

    Curious, it happens to me that I needed to change the folder name from:

    ...\Custom Librarry (MyDll.dll(
    

    to

    ...\Custom Librarry (MyDll.dll)
    

    just by closing the parenthesis it worked !

    0 讨论(0)
  • 2020-11-29 04:51

    I had the same issue, and this link helped me solved the problem, by rename "symsrv.no" to "symsrv.yes" in VS IDE folder.

    0 讨论(0)
  • 2020-11-29 04:52

    The main reason is that you don't have a matching pdb and exe.

    Some possible solutions:

    • You are compiling in release instead of debug
    • You need to clean/build or rebuild
    • You don't have your pdb files being generated in the same directory as the exe
    • You have a mismatching pdb, maybe the copied source is newer than today's date and something isn't building properly.
    • Try cleaning out all debug object files
    • You are attaching to a process that you started from a different location from where your build exe and pdb exist
    • Restart Visual Studio
    0 讨论(0)
  • 2020-11-29 04:54

    This happens to me every now and then, while debugging code and making changes it seems like visual studio caches the pdb information and sometimes it gets stuck. Doing a Rebuild solution, deleting the pdb and creating a new one doesn't fix the problem.

    Of course I do have the generate debug information on and all that it's needed, specially since this happens while debugging the code several times.

    Visual Studio seems to be happy with the in-memory pdb and refuses to update it, regardless of time-stamps or even size changes in the pdb.

    The only way to reset this is to exit Visual Studio (the IDE) and restart it again.

    In some rare occurrences, the IDE might be still running in the background (process explorer shows it there) and might hold the handle to the file open. You can kill the process before restarting the IDE.

    Good Luck

    0 讨论(0)
  • 2020-11-29 04:54

    I faced the same problem and tried all above mentioned solutions but it couldn't help me. Then I found a new solution randomly and it worked.

    Solution is that,in case you are having many projects in a solution then you should mark any one (specific one which you have to decide) project as a "Set as Startup Project". Right click on that specific project and click "Set as Startup Project".

    It worked for me.

    0 讨论(0)
提交回复
热议问题