Use some crazy stuff like cpan::Devel::StackTrace::WithLexicals (or just plain ol' cpan:PadWalker) in a modified cpan:Devel::Trace to do a run-trace that includes lexical state.