Problem
You want to use your browser's console to view detailed error messages environment, but when browser monitoring is active, your browser's console does not display detailed error traces.
Solution
Browser monitoring must capture and re-throw errors in order to record them, but some browser versions do not display stack traces for re-thrown errors. To solve this problem, enable browser's development mode in your local browser.
Browser monitoring agent versions 593 or higher include a workaround for this behavior, which can be enabled in the console. The following procedure is for Google Chrome, but you can adapt it for other browsers.
In Chrome, select the menu icon, then select More tools > JavaScript Console.
From the JavaScript console, set the following value for
nr_flags
in local storage:localStorage.setItem('__nr_flags', 'dev')Refresh the page where you want to see your JavaScript errors.
To confirm development mode is active, check the console's browser agent logs for the message
NR AGENT IN DEVELOPMENT MODE
.Navigate the site, then trigger the errors that you want to track.
To disable development mode, run the following command in the console:
localStorage.removeItem('__nr_flags')
For more help
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's and and documentation.