Generate a "stacktrace" into JavaScript source code