0

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:

enter image description here

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

enter image description here

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

OneMoreQuestion
  • 1,693
  • 3
  • 25
  • 51
  • Instead of a screen shot can you add the actual code? Look at the source code in Chrome and copy the first lines. The first line above is cut off in the screen capture – geeves May 03 '17 at 15:36
  • Try the answer provided here, and tell us if that solves your problem: [Why are all JavaScript Console Logs and Errors showing Line 1](http://stackoverflow.com/questions/23314033/why-are-all-javascript-console-logs-and-errors-showing-line-1-developer-tools) – blex May 03 '17 at 15:37
  • Sometimes it is a memory issue with the browser. Other times adding the map files does wonders. – epascarello May 03 '17 at 15:46
  • @epascarello what map files are you referring to? – OneMoreQuestion May 03 '17 at 16:08
  • @blex the new file solution seems like an overkill for what should ideally be a simple fix, but I will try it. Thanks – OneMoreQuestion May 03 '17 at 16:10
  • @geeves the first lines are just declaring vars – OneMoreQuestion May 03 '17 at 16:12

1 Answers1

0

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.

OneMoreQuestion
  • 1,693
  • 3
  • 25
  • 51