Debug Marker Map is a VS Code extension designed to create, track, and manage structured debug log/alert markers (e.g., [DM.LOG][#0001]) in JavaScript and TypeScript projects — specifically engineered for massive files (50,000+ to 500,000+ lines of code).
✨ Features
🏷️ Automatic Sequential ID Tagging: Assigns unique, padded IDs (#0001, #0002) to every marker for seamless identification and tracking.
🌲 Visual TreeView Sidebar: Lists all markers sorted by line number with distinct states for Active vs Commented-out markers (grayed out).
🧠 Smart Code Analysis & Safe Placement:
Auto-extracts complex property chains (user.info.name), optional chaining (?.), array indices (items[0]), and cross-line property expressions.
Automatically identifies statement boundaries: inserts markers after function calls, inside if blocks, or before return/throw statements without breaking code syntax.
⚡ Large File Optimization (50,000+ Lines):
Fast String Pre-filter ([DM.): Ignores 99.9% of non-marker lines before running regex, boosting scan speeds by 100x.
Save-Only Refresh Mode: Eliminates typing lag by updating the sidebar only when saving (Cmd + S).
🔍 Instant Search & Filter: Quickly filter markers by ID or variable name using VS Code's native list.find search box.
📋 Copy to Clipboard: Copy pre-formatted marker statements to clipboard without indentation for quick pasting.
🛠️ Batch & Individual Utilities: One-click Comment All, Uncomment All, Remove All, and Duplicate ID detection.
⚙️ Customizable Context Menu: Hide or show individual commands on the editor right-click menu.
⚙️ Highlighted Settings
Customize extension behavior via VS Code Settings (Cmd + , ➔ search for debugMarkerMap):
debugMarkerMap.refreshOnSaveOnly(Default: true)
Updates the sidebar only when saving the file (Cmd + S). Essential for zero-latency editing in 50,000+ line files.
debugMarkerMap.insertEmptyLines(Default: false)
Automatically inserts an empty line above and below inserted markers for cleaner visual separation.
debugMarkerMap.show*(Default: true)
Individual toggle settings (showInsertLog, showCopyLog, etc.) to customize which commands appear in your right-click context menu.
debugMarkerMap.markerSeparator(Default: : )
Customizes the separator between variable name and value (e.g., : vs =>).
debugMarkerMap.idPadding(Default: 4)
Sets the zero-padding length for marker IDs (4 ➔ #0001).