VS Code Dump
VS Code Dump creates a single UTF-8 text file that concatenates the most relevant source files from your workspace. It is designed for AI/LLM hand-off, quick context sharing, and lightweight audits without exposing binaries or build artefacts. The extension keeps the output deterministic, respects your filters, and streams large outputs to avoid memory spikes.
Key features
- Deterministic ordering so dumps are reproducible.
- Respects
.gitignore, manual include/exclude lists, and file-size limits.
- Streams large outputs to avoid memory spikes and cleans up on cancellation.
- Preset support for one-click context switching between common project types.
Install
- Marketplace – search for “VS Code Dump” in the VS Code Marketplace and install it (publisher:
blarkdackbyte).
- Manual VSIX – build locally with
npm run package and install via the Extensions view (⋮ → Install from VSIX…).
Use it in three steps
- Run VS Code Dump: Create Dump File from the Command Palette or Explorer context menu, or pick Create Dump from Changes when you only need the latest edits.
- Optionally pick a preset to override the default include/exclude settings for this run.
- Choose whether to open the generated file, reveal it in the Explorer, or simply close the notification.
Keep teams in sync by exporting or importing presets later via the dedicated commands.
Commands
| Command |
Identifier |
Description |
| VS Code Dump: Create Dump File |
codeDump.create |
Collects files and writes the configured output. Allows picking presets, shows progress, and lets you open or reveal the result afterwards. |
| VS Code Dump: Create Dump from Changes |
codeDump.createChanges |
Runs the dump against Git changes only (tracked and untracked). Scope it to the last successful dump or compare with HEAD, falling back to a full run when nothing matches. |
| VS Code Dump: Preview (Dry Run) |
codeDump.preview |
Simulates a dump, listing the first 200 collected files plus statistics in an output channel, then lets you continue into a selective dump if desired. |
| VS Code Dump: Apply Preset |
codeDump.applyPreset |
Applies a configured preset to workspace settings for future runs. |
| VS Code Dump: Export Presets |
codeDump.exportPresets |
Saves the current preset collection to a versioned JSON file so you can share configurations with collaborators. |
| VS Code Dump: Import Presets |
codeDump.importPresets |
Imports presets from a JSON file, letting you review conflicts and choose whether to merge or replace before saving. |
All settings live under VS Code › VS Code Dump. Highlights include:
codeDump.outputPath: Relative path for the dump file (default: .code-dump/code-base.txt).
codeDump.followGitignore: Respect .gitignore files while scanning (default: true).
codeDump.exposeAbsolutePaths: Control whether absolute paths are shown in headers and previews.
codeDump.includeExtensions, codeDump.includeFileNames, codeDump.includeGlobs: Fine-grained inclusion controls.
codeDump.excludeDirs, codeDump.excludeFileNames, codeDump.excludeGlobs: Filters that keep build artefacts and generated files out.
codeDump.maxFileBytes: Cap the size of individual files (default: 5_242_880 bytes).
codeDump.presets: Define reusable presets for different projects or audiences.
When using glob patterns, prefer forward slashes and omit leading ./. Examples: src/**/*.ts to scope inclusions to TypeScript under src, or **/*.spec.ts in codeDump.excludeGlobs to drop test files even if their extensions are otherwise included.
Presets in practice
Presets let you switch configurations quickly. Example:
{
"name": "Backend Lean",
"includeExtensions": ["ts", "tsx", "js", "jsx", "json", "java", "kt", "kts", "groovy", "sql", "yml", "yaml"],
"includeFileNames": ["Dockerfile", "Jenkinsfile", "Makefile", "pom.xml"],
"excludeDirs": ["node_modules", "dist", "out", "build", "target", ".git"],
"excludeGlobs": ["**/*.spec.ts"],
"maxFileBytes": 4194304
}
For Angular CLI repositories, try a preset tuned for templates, styles, and Angular configuration:
{
"name": "Angular Workspace",
"includeExtensions": ["ts", "html", "scss", "css", "sass", "less", "json", "md"],
"includeFileNames": ["angular.json", "tsconfig.app.json", "tsconfig.spec.json", "karma.conf.js", "package.json", "browserslist"],
"excludeDirs": ["dist", ".angular", "coverage", "node_modules", "tmp"],
"maxFileBytes": 3670016
}
How the dump is built
- Stable, locale-aware sorting keeps outputs deterministic.
- Binary detection uses a lightweight NUL-byte check plus your size limit to skip unsuitable files.
.gitignore support (root + nested files) keeps unwanted files out when enabled.
- Streaming writer automatically switches to chunked writes for outputs above ~10 MB.
- Progress notifications offer cancellation, and partial outputs are cleaned up if you abort.
Tips & troubleshooting
- Use Preview (Dry Run) to confirm which files will be included before writing to disk, then pick Select files and dump to deselect anything you want to skip before the actual dump is written. Use the search action in the selection view to filter candidates by name or file contents when working through large trees.
- Create multiple presets (e.g. “LLM hand-off”, “Security review”) and pick the right one per run.
- Disable
codeDump.exposeAbsolutePaths when sharing dumps outside your organisation.
- Lower
codeDump.maxFileBytes if you regularly hit size limits during previews.
More resources
License
MIT