VS2019:Edit and Continue not working for custom file generating Cpp, Error: .idg not in synch with .pdb

Peeyush Chaurasia 0 Reputation points
2023-03-30T06:12:37.08+00:00

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 EditAndContinue_Error

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.

  1. 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.
  2. 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?

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?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,830 questions
Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
189 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
963 questions
{count} votes

1 answer

Sort by: Most helpful
  1. 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