简体   繁体   中英

Debugging in Visual Studio 2010: cxx0030 expression cannot be evaluated

I am debugging quite a large project in C++, with Microsoft Visual Studio 2010, and from some point on, the debugger shows mostly CXX0030: Error: expression cannot be evaluated and sometimes CXX0017: Error: Symbol "" not found instead of the values of variables.

All the objects, data structures, fields, variables that the IDE debugger claims to be not evaluated, actually ARE evaluated, since I can debug further and some computations happen with those "unevaluated" values afterwards...

The project is built with Debug option, x64 .

I am new to the IDE and also the language, so I am kind of lost.

What could it be? Some wrong debugging options? Could it be a mismatch between the debugged software and the built code inside the IDE(this is quite improbable but I start believing in ghosts now...). Something in the build properties? Could it be a wrong thread that I debug(but some field do have evaluated values...)?

The closest I found to my problem as a description is this issue on MSDN

I performed the below answer,

Turn off PCH usage. This avoids the problem altogether. but in vain.

EDIT: In the end it turned out there were differences in the versions of .pdb debug file and the .exe since they were not exactly the same revision. I was getting Symbols cannot be loaded error, visible in the Modules view while debugging.

There were two possible solutions:

  1. equalize exactly the revisions of the debugged software and the checked out code and add the application_name.pdb file that is produced in the build to the bin folder where the debugged application_name.exe lived, so that the debugger could see them
  2. substitute the application_name.exe from the build to the software (and hope nothing breaks) and also add application_name.pdb file in the same folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM