This is an old question, so I donβt know if it will help, but I found this while trying to solve another Chrome Devtools error.
I have run into this problem lately, and it seems that something can happen to the file (corruption?) That prevents Chrome from correctly reading line breaks. In my case, it was reported that all console.log () came from a line: 1. After pulling my hair out for some time, the only solution I found was to rename the damaging file, create a new file with the original file name, and then pasting all the code into a new file. console.log () should now report on the correct line numbers.
source share