Debugging Threads.@spawn applied to Expr data

I am using meta-programming combined with multi-threading. I am trying to @spawn an Expr expression which is evaluated, i.e.

e = quote [...] end
tmp = Threads.@spawn eval(e)

If I @show tmp, sometimes it says Task (runnable) and other times Task (failed). In either case, the task doesn’t actually do anything, or I cannot figure out what it is doing: complete silence, i.e. no output etc… Are there any tools for debugging such a statement?

(I will be converting this statement to spawning a function call and do the expression evaluation inside that function next but I would prefer to avoid doing this.)

Thank you.

@macroexpand is your friend. Maybe you need Threads.@spawn $(eval(e))? Although, using eval within a macro-call looks code-smelly to me.

Thank you for the suggestions. I’ll play around some more. Function call worked and I found an error in the expression but the silence was annoying.