I have a large database that I read from a yaml file. I loop over elements of the database to create the document text. I call eval on items from the database because the strings actually contain Typst function calls.
The problem is that if there is an error in eval I can not see which of the loop iterations/database items that cause the error. The App does show the first 10 variable values in the loop but that doesn’t help since there are 100s of loop iterations before the error.
Any ideas how to debug this?
Here is a code snippet:
for (field) in regdb.at("Fields") {
let desc = field.at("Description")
let ev_desc = eval(desc, mode:"markup",
scope:(def:def,tab:tab,register:register,field:field))