When your cursor lands on a C/C++ preprocessor directive (#if, #ifdef, #ifndef, #else, #elif, #endif), all matching directives in the same block are highlighted simultaneously — even across hundreds of lines.
Highlight the entire directive chain at once (not just jump to one)
Works with nested preprocessor blocks (correctly handles stacking)
Supports C, C++, GNU Assembly (.S / .s), and any file with #if directives
Configurable highlight colors
Lightweight — zero dependencies, pure VS Code API
Why this extension?
VS Code's built-in bracket matching can jump between #if and #endif (Ctrl+Shift+), but it doesn't show you the whole picture at a glance. This extension highlights the entire #if → #else → #endif chain simultaneously, so you can instantly see the structure of complex conditional compilation blocks.
Installation
Search ifelse Match Highlight in the VS Code Extensions panel, or install via command line: