mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-27 06:43:19 +08:00
Indexed reads that can miss lower through shared helpers (`%arr.idxOr`, `%bytes.idxOr`), and printing a value that can be undefined goes through a shared formatter (`%util.fmtv`). Each helper took the location of the read or print that first created it, so its body carried that line's debug locations. A breakpoint on such a line then resolved to every helper as well, and the debugger stopped inside helper code where the user's variables are not in scope. The helpers are compiler code, so they now get a location without a source position (helperLoc). They emit no debug info, while each call still carries the user's location, so a breakpoint on the line stops only at the read or print itself.