C++ Code Doctor - Compiler-Independent C++ Static Analysis for VS CodeFind unused C++ variables, remove unnecessary includes, and catch overlooked code issues directly in VS Code, without compiler setup or an additional build step. C++ Code Doctor helps you keep your C++ codebase clean and maintainable with immediate feedback while you code, independently of your compiler toolchain.
Start with the free version and upgrade when you need deeper analysis. Install C++ Code Doctor · Explore Pro See It in ActionUnused Variable Detection
Find unused variables directly in your C++ source files. Unused Include Detection
Identify unnecessary header dependencies and keep your source files focused on the headers they actually need. Unevaluated Return Value Detection (Pro only)
Detect function return values that are computed but never used and identify potential logic issues that might otherwise go unnoticed. Why C++ Code Doctor?C++ projects accumulate unused variables, unnecessary includes, and other code that makes a codebase harder to maintain. C++ Code Doctor helps you identify these issues directly in VS Code, without requiring a separate compiler integration or build step. Compiler-Independent AnalysisAdd static analysis to your C++ workflow without configuring compiler integration for the supported checks. C++ Code Doctor works independently of your compiler and build system, making it useful for projects with custom toolchains and complex build environments. Clean Up Unused CodeFind unused variables and unnecessary includes before they become part of a larger codebase. Reduce Unnecessary DependenciesUnneeded includes can increase dependency coupling and contribute to longer compilation times. Identifying them helps keep your translation units leaner. Free vs. ProChoose the analysis approach that fits your project.
Compare plans and upgrade to Pro Free: Lightweight C++ AnalysisThe Free version uses regex-based detection to identify unused variables and includes in individual files. What's Included
LimitationsBecause the analysis relies on text patterns rather than a full structural representation of the code, complex C++ syntax can lead to false positives or missed findings. In particular:
The Free version is a convenient starting point for straightforward C++ files. If you work with complex C++ code or need analysis across multiple files, Pro provides a more advanced approach. Pro: AST-Based C++ AnalysisGo beyond text matching. Pro uses Tree-sitter to analyze C++ code structure, enabling more context-aware checks for unused variables and includes. It also provides unevaluated return value checks, project-wide analysis, a dedicated findings panel, and persistent false-positive suppression. What's Included
Why AST-Based Analysis MattersC++ is more than a collection of text patterns. Scopes, declarations, namespaces, templates, and relationships between files can make it difficult to determine whether a variable or include is actually needed. Pro uses Tree-sitter to analyze the structure of your code, enabling more context-aware checks and helping reduce false positives in cases where text-based detection falls short. This makes Pro particularly useful for larger and more complex C++ codebases. AST-based analysis is not infallible. Certain aliases, complex include dependencies, and macro-heavy code can still produce inaccurate results. Installation and Requirements
No separate compiler integration, build step, or additional analysis toolchain is required for the supported checks. C++ Code Doctor does not replace your compiler, build system, or existing diagnostics. It complements your development workflow with additional code-quality checks. Activating ProTo activate Pro, enter your license key in the VS Code setting:
Once activated, the Pro features become available according to your license. For pricing and licensing information, visit the C++ Code Doctor pricing page. Known LimitationsStatic analysis has inherent limitations, especially when analyzing complex C++ language constructs. Free
Pro
The analysis is continuously refined to improve reliability across real-world C++ codebases. Third-Party ComponentsC++ Code Doctor uses the following third-party components:
See the LicenseC++ Code Doctor is proprietary software. See ChangelogSee CHANGELOG.md for release history and updates. |