How to debugger for custom language generating C++ during preprocessingin VS2019?
Peeyush Chaurasia
0
Reputation points
Hi,
We are using custom language say FileName.xyz which on precompilation preprocessing temporarily generates C++ files, which in turn is built to an executable (and PDB for temporary C++ files symbols).
We want to Debug this Filename.xyz using exe and PDBs.
the difference between FileName.xyz and generated FileName.cpp is that
- CPP file has additional code #include etc. in the beginning so 1st stmt in xyz may appear at 11th line in cpp
- to map line differences and filename at line 10th in FileName.cpp it puts
#line 1 FileName.xyz
is used to set __LINE and __FILE before 1st statement
- also each "custom language statement;" is inline replaced in CPP with their function definition "n-comma separated statements;" (same way as #define functions get replaced during pre-processing).
In Visual Studio 2019:
- How Can I debug FileName.xyz (place brakepoint, check variable values/callstack, F9, F10, F11, Shift+F11) using standard C++ debugger with exe and generated pdbs for C++ file?
- I need some explicit mapping for .xyz file to debugger, and .xyz to .cpp pdbs, but what exactly not sure and how?
- do I need Custom debugger for this?
Sign in to answer