SavindraSingh
SavindraSingh

Reputation: 961

Chrome/Edge developer tools not showing source code in Sources tab unless refresh

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:

  1. 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. before refreshing the page

  2. Sources tab After refreshing the page after refreshing the page

EDIT: Current settings in the Developer Window just in case that helps in identifying the issue:

enter image description here

Upvotes: 6

Views: 6159

Answers (2)

Ravi Padhi
Ravi Padhi

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

andrew hughes
andrew hughes

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

Related Questions