Reputation: 961
I went through lot of questions and answers about this issue but NONE of the answers are talking about the root cause of the problem and how to solve it permanently.
When, I open the developer tools for any tab in Google Chrome or Edge browsers and check the Sources tab, it is NOT showing the source code (for JavaScript/Script) by default. However, if I refresh the page while Developer Tools is still open, then it starts showing the source code.
I don't know where and how to fix this behavior, earlier this use to work normally when I open Developer Tools, it use to show the source code under Sources tab without refreshing the page.
Some screen-shots to help better understand what I mean:
When I open developer tools, Sources Tab (before refreshing the page). Even when I double click on the File name, it still won't show the source page unless I refresh the whole page.
EDIT: Current settings in the Developer Window just in case that helps in identifying the issue:
Upvotes: 6
Views: 6159
Reputation: 31
Add a console.log in your code, then run the page when your console.log show in the console window then click on that line number on right side, it will forcefully open the source file, it happened with me ;) Happy debugging.
Upvotes: 3
Reputation: 11
i've had a similar problem, i systematically deleted parts of my code until it worked and it turns out it was because i was using javascript style comment blocks see here https://stackoverflow.com/a/76834779/7250354
Upvotes: 1