ShowFlags - Visual Studio Code Extension
The ShowFlags extension displays a status bar item (for C/C++ files only) which continuously shows all preprocessing conditions (a.k.a. flags - determined by surrounding #if/#ifdef directives) that apply to the line of code where the cursor is located.
Alternatively, the "ShowFlags: Report" command may be used to output a more verbose one-time report of the same information to the ShowFlags channel in the Output pane.
Displaying Flags in Status Bar
Set "showflags.enableStatusBarDisplay" to false to disable this (e.g. if your status bar is too crowded).
The following snapshot shows the cursor on line 7 which will only be compiled when both of the following conditions are true:
Therefore, the ShowFlags extension shows those two conditions in the status bar as a breadcrumb trail (each preceded by a triangle).
Displaying Flags in Output Pane
Use the "ShowFlags: Report" command (via View -> Command Palette or by clicking on the ShowFlags status bar item) to output a more verbose one-time report to the ShowFlags channel in the Output pane. This report contains basically the same information as the status bar item (but it will not change dynamically when the cursor moves).
If the ShowFlags extension fails to show the preprocessor conditions due to a directive error in the portion of the file from line 1 down to and including the line where the cursor is located, an appropriate error message will be displayed in the status bar (and/or output pane).
Set "showflags.showTabWarning" to true to enable this.
If there are any tab characters in the portion of the file from line 1 down to and including the line where the cursor is located, the status bar (and/or output pane) will show the line number of the last such tab character.