简体   繁体   中英

How to better identify error line number in Chrome Inspector tools

Here is an issue I come across from time to time, when there is an error with the code, Chrome's browser console will catch the error but does not point to the actual location of the error / line number. As seen in the screenshot below:

在此处输入图片说明

Console catches the error but points to line 1, which is just the title and references, and does not have me debug.

在此处输入图片说明

Is there any known extensions or approaches to get around this issue?

This is not a cache issue as clearing cache does not resolve it.

Seems like the best way to get around it is to figure out exactly what triggers the issue (in my case it was a button click), and inspect the element (said button) at that location . Here it was an extra ' in the onclick() parameter that caused it.

If anyone has a better alternative please suggest.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM