what #define are defined

Within VS or other, for each source file of a solution/project is there a way of obtaining a list of all #define symbols (including within #include files) and the value of the defined symbols?
The cpp (in GCC) has debug options like -dM
See https://gcc.gnu.org/onlinedocs/cpp/Invocation.html
This should work for MSVC:
cl.exe /PD /Zc:preprocessor test.c

See also here for /PD option:
https://learn.microsoft.com/en-us/cpp/build/reference/compiler-options-listed-alphabetically?view=msvc-170
Last edited on
Thanks. I missed that one........
Topic archived. No new replies allowed.