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 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 "Edits were made which cannot be compiled.", options: Edit / Revert / Ignore / Stop
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:
a. 1st manual conversion of .xyz to cpp, b. then manual CPP file compilation so that pdb is generated and c. 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 not sure what above paragraph is suggesting, but I've even removed custom build steps1 for custom file FileName.xyz and tried only step2 above to manually convert xyz to cpp and compile to get .obj and .pdb, then trigger "Apply Code Changes", but still getting same error.
Any Inputs?