How to show JavaScript error stack trace for source map instead of minified code?

Viewed 308

I have a create-react-app web app deployed to production with source map enabled and logging errors to the console. I would like to debug the error shown below, but it is giving me a stack trace for the minified JS file.

How can I get the stack trace mapped to my original code? It seems to do that partially already because hovering over xhr.js:30 in the top right links to some node_modules code from axios, but the rest links to the minified file.

This error only happens in production and I can't debug without knowing what line in my code is causing it.

enter image description here

0 Answers
Related