C Through
Features🌳 Sidebar Tree ViewA live, structured breakdown of every C/C++ file — organized into collapsible sections:
Click any item to jump directly to its definition in the source file. 🔍 Interactive Call GraphA fully interactive visual graph of function call relationships.
Node colors:
💡 CodeLens Inline MetricsClickable annotations appear directly above every function definition — no panel switching required.
Complexity thresholds:
📂 Flexible Scan Scope
Cross-file caller/callee relationships are fully resolved after any multi-file scan. InstallationFrom VS Code Marketplace
From VSIX
UsageQuick Start
Commands (
|
| Command | Description |
|---|---|
C Through: Analyze Current File |
Parse the active C/C++ file |
C Through: Analyze Entire Workspace |
Scan all C/C++ files in workspace |
C Through: Analyze This Directory |
Pick a folder to scan |
C Through: Re-scan Last Scope |
Repeat the previous scan |
C Through: Show Relational Tree |
Open call graph for symbol at cursor |
C Through: Show Functions Called By This |
Open callees tree |
C Through: Show Functions Calling This |
Open callers tree |
C Through: Toggle CodeLens |
Show/hide inline CodeLens |
Context Menus
- Editor — right-click inside any C/C++ file for tree commands
- Explorer — right-click any folder for Analyze This Directory
Settings
| Setting | Default | Description |
|---|---|---|
cThrough.maxDepth |
5 |
Maximum call tree traversal depth |
cThrough.showStdLib |
false |
Include stdlib calls in tree |
cThrough.autoRefresh |
true |
Re-parse file on save |
cThrough.enableCodeLens |
true |
Show inline CodeLens |
cThrough.includeGlob |
**/*.{c,h,cpp,hpp} |
File pattern for scan |
cThrough.excludeGlob |
**/node_modules/** |
Paths to exclude from scan |
Example — scan only src/, skip build/ and vendor/:
{
"cThrough.includeGlob": "src/**/*.{c,h}",
"cThrough.excludeGlob": "{**/build/**,**/vendor/**,**/third_party/**}"
}
How It Works
C Through uses regex-based static analysis — no compiler, no language server, no build system required. Works on any C/C++ file that can be opened in VS Code.
The parser:
- Strips comments and string literals
- Extracts
#include,#define,struct/typedefdefinitions - Identifies function definitions by signature pattern matching
- Extracts all call sites inside each function body
- Calculates cyclomatic complexity per function
- Builds a cross-file caller/callee index across all scanned files
Known Limitations
- Function pointers are detected but cannot be statically resolved to targets
- Heavily macro-expanded signatures may not be fully parsed
- Very large files (10,000+ lines) may have partial symbol extraction
- C++ template specializations may be missed
Changelog
v1.3.3
- Added Sidebar toggle button (
☰) — hide/show the right panel - Theme and sidebar state now persist across panel re-opens via VS Code state
- Clicking Globals, Macros, and Includes in the sidebar now jumps to their exact source line
- Expanded global variable detection to support struct, typedef, and custom types
- Toolbar buttons are now icon-only for a cleaner, less crowded layout
v1.3.0
- Added Dark / Light mode toggle button in the call graph toolbar
- All UI elements switch theme instantly — background, sidebar, legend, links
- Node colors and function name labels are fully theme-aware
- Fixed function name labels becoming invisible in light mode
v1.2.2
- Added CodeLens inline annotations (callers, callees, complexity, dead code warning)
- Added cyclomatic complexity calculation per function
- Added Toggle CodeLens command and sidebar button
v1.1.0
- Added Analyze This Directory — right-click any folder in Explorer
- Removed 200-file scan cap — workspace scan now unlimited
- Added Re-scan Last Scope button
- Added
includeGlob/excludeGlobsettings - Scope-aware auto-refresh on save
v1.0.0
- Initial release
- Sidebar tree: includes, structs, macros, globals, functions
- Interactive call graph with pan/zoom
- Cross-file caller/callee analysis
- Auto-analyze on file open
License
MIT © 2026