Tips for debugging JavaScript errors with Chrome

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Tips for debugging JavaScript errors with Chrome

Postby JS-Support @Userware » Wed Sep 30, 2015 8:59 am

Hello,

Here are some steps to more easily debug JavaScript errors with Chrome:

1) Open the Chrome developer tools (Ctrl+Shift+I)
2) Enable the option "Pause on exceptions" by clicking the round icon that contains a Pause sign.
3) Check the option "Pause on Caught Exceptions"
4) Reload the page
5) When the exception occurs, look at the live "Call Stack", as show in the following screenshot:

chrome_pause_on_exceptions.png
chrome_pause_on_exceptions.png (24.85 KiB) Viewed 10327 times

You can then double-click on any element of the Call Stack, and it will show you the corresponding source code. You can then inspect the value of the variables by placing the mouse pointer over them.

Regards,
JS-Support

Return to “General Discussion and Other”

Who is online

Users browsing this forum: No registered users and 21 guests

 

 

cron