Developer Tools

vsourcemap

Loads a build’s source map and tells you where each function came from.

Released v1.0.0 · 2026-09-28
Import
use "stdlib/sourcemap.ven"

Loads and queries the per function source map that the compiler's own build command can write out, letting a tool look up which original source line a piece of compiled output came from. It reads and searches an existing, real source map file rather than generating a new mapping format.

vsourcemap.ven
print load_source_map("build/app.map.json")
Reference (7 functions)

API reference

load_source_map(path)

load_source_map("build/app.map.json")

source_map_entries(map)

Gives back a loaded source map's flat list of per-instruction entries.

source_map_entries(load_source_map("build/app.map.json"))

source_map_root(map)

Gives back a loaded source map's root file path.

source_map_root(load_source_map("build/app.map.json"))

function_entries(map, function_name)

Filters a source map down to the entries belonging to one function.

function_entries(load_source_map("build/app.map.json"), "add")

function_source_file(map, function_name)

Gives back the one file a named function's declaration came from.

function_source_file(load_source_map("build/app.map.json"), "add")

resolve_pc(map, function_name, pc)

Resolves a (function, program-counter) pair to its source line.

resolve_pc(load_source_map("build/app.map.json"), "add", 2)

nearest_entry(map, function_name, target_line)

Finds the entry in one function whose line is closest to a target line.

nearest_entry(load_source_map("build/app.map.json"), "sub", 6)

Get notified when vsourcemap changes

Get notified about

New versions and security advisories.

New and updated packages, once a day.

News on the math model built in Venutian.