VS2019:Edit and Continue not working for custom file generating Cpp, Error: .idg not in synch with .pdb
We are using custom language say FileName.xyz which on precompilation preprocessing by separate tool XYZConverterCPP.exe temporarily generates C++ files FileName.cpp, which in turn is built by VS2019 to an executable (and PDB for temporary C++ files symbols).
Using
#line 1 FileName.xyz
in FileName.Cpp I'm able to debug FileName.xyz.
Observation is EditAndContinue feature of applying code modification during live debugging is not working.
VS2019 is detecting changes in FileName.xyz but getting Error messagebox "changes cannot be compiled", as not able to trigger Custom Build Command for FileName.xyz
and also output following error message: Edit and Continue : error : The dependency information for 'FileName.xyz' in the state (.idb) file(s) '' is out of sync with the Program Database (.pdb) file 'C:\Projects\FileName.pdb' for 'FileName.exe'. Ensure that the file is compiled with the Enable Minimal Rebuild (/Gm) option.
I'm building project with EditAndContinue, /Gm (minimum rebuild) settings.
- Even providing Custom Compiler command for FileName.xyz and make it participates in build=yes. But EditAndContinue still not triggering Custom build of FileName.xyz.
- I've also tried before applying code changes in debug session:
- 1st manual conversion of .xyz to cpp,
- then manual CPP file compilation so that pdb is generated and
- then triggering 'Apply Code Changes' so that it picks up, and .idg and .pdb not in synch error is avoided, but still same error.
Any Input?
Reading MSDN link https://learn.microsoft.com/en-us/visualstudio/debugger/supported-code-changes-cpp Auto relinking limitations Edit and Continue does not invoke custom build steps. If your program uses custom build steps, you might want to rebuild manually so that custom build steps can be invoked. In that case, you can disable relinking after Edit and Continue to ensure that you are prompted to manually rebuild.
I'm observing Edit and Continue creates this path $(OutDir)/enc__temp__folder/Guid/FileName.xyz
*Is there any way I can trigger custom action to manually generate updated cpp file before Edit and Continue starts FileNmae.xyz build?*
Any Inputs to fix it?
1 answer
Sort by: Most helpful
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more