Source Map Debugger
v0.2.1Debug production source maps: fetch, inspect, look up and extract original sources
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
sourcemap_info Source Map Info
Show metadata and statistics for a source map file. Returns file name, source count, names, mappings count, lines, content size, and debug ID. Use this to understand what a source map contains before doing lookups.
| Parameter | Type | Description |
|---|---|---|
file * | string | Path to a source map file (.map) |
sourcemap_validate Validate Source Map
Validate that a file is a valid source map. Reports whether the map is valid and its basic structure (sources, names, mappings count).
| Parameter | Type | Description |
|---|---|---|
file * | string | Path to a source map file (.map) |
sourcemap_sources List Sources
List all original source files embedded in a source map. Shows each source path, whether it has embedded content, content size, and if it's on the ignore list. Use this to understand what files a bundle was built from.
| Parameter | Type | Description |
|---|---|---|
file * | string | Path to a source map file (.map) |
sourcemap_mappings List Mappings
List mappings in a source map with pagination. Shows generated and original positions for each mapping. Optionally filter by source file. Use --limit and --offset for pagination.
| Parameter | Type | Description |
|---|---|---|
file * | string | Path to a source map file (.map) |
limit | number | Maximum number of mappings to return (default: 50) |
offset | number | Skip first N mappings (default: 0) |
source | string | Filter by source filename |
sourcemap_lookup Lookup Original Position
Find the original source position for a generated (minified) position. Given a line and column in the generated/minified file, returns the original source file, line, column, and optionally the identifier name. Use --context to also get surrounding lines of original source code. All positions are 0-based.
| Parameter | Type | Description |
|---|---|---|
column * | number | Generated column number (0-based) |
file * | string | Path to a source map file (.map) |
line * | number | Generated line number (0-based) |
context | number | Number of context lines to show around the matched position (default: 5) |
sourcemap_resolve Resolve Generated Position
Reverse lookup: find the generated (minified) position for an original source position. Given a source file, line, and column, returns the generated line and column. All positions are 0-based.
| Parameter | Type | Description |
|---|---|---|
column * | number | Original column number (0-based) |
file * | string | Path to a source map file (.map) |
line * | number | Original line number (0-based) |
source * | string | Original source filename (as it appears in the source map) |
sourcemap_fetch Fetch Bundle & Source Map
Download a JavaScript or CSS bundle and its source map from a URL. Automatically resolves the sourceMappingURL reference (inline data URIs, external URLs, and conventional .map suffix fallback). Saves both files to the output directory. Use this as the first step when debugging a production website.
| Parameter | Type | Description |
|---|---|---|
url * | string | URL of the JavaScript or CSS file to fetch |
outputDir | string | Directory to save the downloaded files (default: /tmp/srcmap) |
sourcemap_extract_sources Extract Original Sources
Extract all embedded original source files from a source map to disk. Writes each sourcesContent entry as a file, preserving the directory structure. Handles webpack://, file://, and relative path prefixes. Use this after fetching a source map to get the full original source tree.
| Parameter | Type | Description |
|---|---|---|
file * | string | Path to a source map file (.map) |
outputDir | string | Directory to extract source files to (default: /tmp/srcmap-sources) |