Troubleshoot JavaScript Errors

You can debug JavaScript Errors and find the exact line of error using the Stack Trace.

You can filter JavaScript Errors based on:

  1. Error lists
  2. Types
  3. File
  4. Browser
  5. URL/Page
  6. User
  7. Domain

You can click individual errors to inspect further.

Interpreting JavaScript Errors using Site24x7 Real User Monitoring (RUM):

  1. Log in to your Site24x7 account > RUM > Your application > JavaScript Errors.
  2. Choose a specific time period. In this example, JavaScript Errors that have occurred over the past week are displayed for the ZYLKER app.
  3. Here we can see that over 865 JavaScript Errors have occurred over the last week in 33 files and 58 webpages, affecting over 137 users.
  4. Click the + New Filter button to narrow down the errors based on Error list, Type, Browser, User, URL/Page, or Domain.
  5. For our example, the errors are filtered based on Type. Choose Script Error and click Save.
  6. You can also use multiple filters. For example, you can choose to see the number of syntax errors that have happened on a Chrome browser. 
  7. Applying the above filters shows us three JavaScript Errors. Click any of the errors to inspect further.
  8. From the above image, you can clearly drill down to the exact instance of this particular error occurring.You can also find the line of code in the error using the Stack Trace. If your JavaScript file is minified, you can upload your sourcemaps to debug further.
  9. You can also ignore certain JS errors if you don't want to track. Simply click on 'Ignore' and the selected JS errors will not be captured further.
  10. You can also click on 'Activate' to captured the previously ignored JavaScript errors.
  11. Click Error Instances to find all the occurrences of this particular error.
  12. You can export this information as a PDF file.

Note: You can upload the source map of a JS file to identify the exact line of error in a stack trace. 

  1. Please follow the below given steps:
  2. Log in to your Site24x7 account > go to RUM > click on your application.
  3. Navigate to JavaScript errors > Click on an error.
  4. Upload the corresponding JS source map by clicking on Upload Source Map.
  5. You can now view the exact line of error in the stack trace. Click on Export CSV to download your stack trace as a CSV file. 

Learn more about source maps and how to generate them. 

Was this document helpful?
Thanks for taking the time to share your feedback. We’ll use your feedback to improve our online help resources.