Skip to content
DiagnosticsOverviewNew · 0.744

getscriptsourcemap

Describe source locations associated with script diagnostics.

Details#

Returns available source locations for the current frames of a script thread. Entries contain source, short_src, line and linedefined. This is not a complete compiler source map; no associated thread yields an empty table.

Examples#

Example

Luau
local ownScript = Instance.new("LocalScript")
for _, location in ipairs(getscriptsourcemap(ownScript)) do
    print(location.short_src, location.line)
end
ownScript:Destroy()