A Visual Studio Code extension that highlights extern variable references across your C/C++ project, making it easier to identify and track extern variable usage.
Features
Automatically highlights extern variable references in your code
Cross-project reference support:
Detects extern declarations across multiple files in your workspace
Processes files recursively up to 5 directory levels deep
Smart detection:
Ignores variables within comments
Processes files up to 500KB in size
Handles up to 100 files per workspace
Customizable highlighting:
Configure highlight color
Configure background color
Easy toggle on/off functionality
Usage
Open a C or C++ file in your workspace
Extern variable references will automatically be highlighted
Use keyboard shortcuts to toggle highlighting
Toggle Highlighting
ctrl+alt+v: Toggle highlighting
Examples
Extern Variable Usage
// In header file
extern int globalCounter;
extern const char* configPath;
// In source file
void someFunction() {
// 'globalCounter' and 'configPath' will be highlighted
globalCounter++;
printf("Config: %s\n", configPath);
}
Supported File Types
The extension supports the following file extensions:
.c
.cpp
.h
.hpp
.cxx
.hxx
Requirements
Visual Studio Code version 1.96.0 or higher
Extension Settings
This extension contributes the following settings: