XapBug for VS Code
Zero-cloud static analyzer — detects resource leaks, null dereferences, and missing awaits as you type.
100% Local-First. Zero Cloud. 0 Byte external traffic.
Features
- 50 Pure-AST languages — C, C++, Go, Rust, Python, JS/TS/TSX, Java, C#, PHP, Ruby, Kotlin, Swift, Dart, Scala, Elixir, Zig, Ada, Fortran, SQL, Solidity, Vue/Svelte & more (
tree-sitter WASM)
- Inline diagnostics & 1-Click QuickFix (
Cmd+. / Ctrl+.) — deterministic AST Auto-Repair with automatic LRU-50 snapshot rollback (~/.xapbug/snapshots/)
- Multi-file Self-Healing — automatically synthesizes custom project contracts into
.xapbug/custom_rules.json with zero regex hacks
- Zero network — runs entirely locally via
26.3 KB Fail-Closed WASM (agent_core.wasm, 1.61 μs), 5.5 MB encrypted rules.bin (12,000 rules Tier-3 fallback), and offline Ed25519 licensing
Try It Online
xapbug.com — no install required. Paste your code and get results instantly.
Installation
Search for XapBug in the VS Code Extensions Marketplace, or install via command line:
code --install-extension xapbug.xapbug
Or install the .vsix package directly:
code --install-extension xapbug-1.0.0.vsix
Bug Types Detected
| Code |
Severity |
Description |
resource-leak |
error |
ΣQ ≠ 0 — acquired resource without matching release across CFG paths |
double-free |
error |
CWE-415 — resource released more than once (ΣQ < 0) |
mismatched-dealloc |
error |
CWE-762 — mismatched allocator/deallocator pair (e.g. new[] + delete) |
null-deref |
error |
Unguarded property access on a nullable/optional value |
await-missing |
warning |
Multi-file async call without await |
sql-injection |
error |
CWE-89 — dynamic string interpolation into SQL query sinks |
Usage
The extension activates automatically on supported file types. Bugs appear as inline diagnostics in the Problems panel.
Commands (open Command Palette with Cmd+Shift+P / Ctrl+Shift+P):
| Command |
Description |
XapBug: Analyze Current File |
Force re-analysis of the open file |
XapBug: Show Panel |
Open the agent panel with detailed results |
XapBug: Clear Diagnostics |
Clear all diagnostics |
Configuration
Add to your settings.json:
{
"xapbug.runOnSave": true,
"xapbug.severity": "error",
"xapbug.languages": ["typescript", "javascript", "python", "c", "cpp"]
}
Guarantee Scope
✅ 100% Deterministic Guarantee (∑Qi = 0 invariant)
These structural/lifecycle bug classes are verified by Engine V2 Pure-AST across all 50 languages:
- Resource leaks / double-free / CWE-762:
malloc/free, fopen/fclose, socket/close, new/delete[], DB/observer pairs
- Null/undefined dereference: unguarded property or method access on a nullable return value without a prior null guard
- async contract violations: project-wide
async call without await
- SQL injection (CWE-89): unparameterized dynamic string interpolation in SQL query sinks
❌ Outside Guarantee Scope
- Business logic errors (e.g., wrong discount percentage, inverted domain condition)
- Arbitrary algorithmic semantic errors (sort direction, domain off-by-one)
- Thread race conditions and scheduling-dependent data races
- Runtime-only failures (network timeouts, disk/permission errors)
Privacy & Security
- Zero telemetry — no usage data is collected
- Zero cloud — analysis never leaves your machine
- Fail-Closed WASM sandbox —
agent_core.wasm (26.3 KB, 1.61 μs check, 0 network imports)
- No internet permission — offline Ed25519 licensing supported
Engine
Powered by Engine V2 (media/engine-v2/) + 50 Tree-sitter WASMs (media/treesitter/, ~100 MB) + agent_core.wasm (26.3 KB) + AES-256-GCM encrypted rules.bin (5.5 MB, 12,000 Key Vault rules). Whole extension packaged cleanly in xapbug-1.0.0.vsix (14.57 MB, 88 files).
Known Issues
No known issues.
Requirements
- VS Code 1.85.0 or later
- Node.js 18+ (for rule processing)
License
MIT
Made by Web IDE at xapbug.com