Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Code StatisticsNew to Visual Studio Code? Get it now.
Code Statistics

Code Statistics

Cx330-502

| (0) | Free
Show total code lines and per-extension line counts in Explorer.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Code Statistics

Code Statistics adds a collapsible view under VS Code Explorer to show:

  • Selected total code lines in the current workspace.
  • All detected text-code lines.
  • Total counted files.
  • Line counts grouped by file extension.

Behavior

  • Uses workspace root .gitignore rules when present.
  • Detects binary files and excludes them from counting.
  • Also ignores common generated/cache directories by default, including:
    • .git, node_modules, dist, build, out, coverage
    • .cache, .next, .nuxt, .turbo, .mypy_cache, .pytest_cache, .ruff_cache
    • .idea, .vscode, __pycache__, .venv, venv, target, tmp, temp
  • Excludes common binary/media/archive artifacts by default (images, videos, audio, archives, etc.).
  • Excludes common cache/binary suffixes by default (*.pyc, *.pyo, *.class, *.map, *.log, *.lock, etc.).

Usage

  1. Open a folder/workspace in VS Code.
  2. Open the Explorer panel.
  3. Expand Code Statistics.
  4. Click a file-type row to include/exclude it from Selected Lines.
  5. Use Select All / Clear Selection in the view title as needed.
  6. Click refresh in the view title to re-scan.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft