In the IDE 2.x, there is an "About Arduino" that lists the IDE version numbers, and is copy-able (presumably useful for bug reports, although it seems a little scant for that (doesn't include the target OS, for instance.))
I think it would be "nice" if there were a similar "About Current Sketch" command that showed the board, port, programmer, and any per-board options that have been set, ALSO set up for "copy." That might make it easier to get relevant data in the forum messages that always seem to leave such details out.
(Most of the data seems to be already available. Using MegaTinyCore in 1.8.19, the list of options included on the bottom of the window is longer than my screen is wide. IDE 2.x doesn't seem to show as much.)
I know it is not what you are asking for, but since it is a way for those of us who support Arduino users to obtain this information, I'll mention that it can be derived from the verbose compilation output. The verbose compilation output shows the machine identifier for the board (FQBN). For example, if I have Tools > Board > Arduino AVR Boards > Arduino Nano and Tools > Processor > ATmega328P (Old bootloader) selected, then it will show this:
The next lines of the verbose compilation output are also useful in that they contain the version number of the platform:
Using board 'nano' from platform in folder: C:\Users\per\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\per\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6