Confusion with platform.local.txt

I'm running on Ubuntu 23.10 and Arduino IDE version 2.3.2.

I am trying to get the compiler to output a list of all of the macros that are defined. I found another thread https://forum.arduino.cc/t/how-do-determine-which-platform-txt-file-is-in-effect-during-compile/1052183 that explains how to find out where my platform.local.txt should be located. The results on my machine are:

Using board 'robotControl' from platform in folder: /home/greg/.arduino15/packages/arduino/hardware/avr/1.8.6

I have put a platform.local.txt file in that directory and added just one line to it:

compiler.cpp.extra_flags=-dM

but this new flag is not added to the compiler command line.

The actual compiler is executed with:

/home/greg/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ ...

I am obviously missing something, but can't figure it out. Any help would be greatly appreciated.

Regards,
Greg

Hi @gwlindberg. Select File > Quit from the Arduino IDE menus, start Arduino IDE, then try compiling the sketch once again.

Arduino IDE only reads the platform configuration files on startup, so if you add a platform.local.txt file or modify the contents of the files while Arduino IDE is running your changes won't have any effect.

@ ptillisch, I knew I needed a clue bat, thanks. Now that I read your response, I remember that I had read that. Obviously it didn't penetrate far enough.
That has fixed that problem, now I see the -dM on the command line, but where does that output go? According to the gcc doc's the standard output should contain the macros, and then the compilation should end. I have verbose output turned on, but I am not seeing any standard output from the compiler. I have added -E which stops the compilation after the preprocessing so the link stage is failing. But I can't find any output that contains the macros.

Regards,
Greg