Add stacktrace middleware to dev profile