STATUS: barely alpha, like a sad omegaverse protagonist.
Visit trace-svelte.vercel.app to check more examples and a live editor
<!-- App.svelte -->
<script>
import { Trace, TLine } from "trace-svelte";
let step = 0; // based on the highlights array below
let highlights = [
[], // no highlights = empty array
[1], // to highlight a line, add to array (starts at 1)
[1,3], // include multiple lines
[2]
]
</script>
<Trace {step} {highlights}>
<TLine>const name = "Joe";</TLine>
<TLine>// use that variable</TLine>
<TLine>console.log(variable)</TLine>
</Trace>