Microsoft Edge Version 92.0.902.78 (Official build) (64-bit) on Windows 10 Professional 64-bit. On certain pages, when I open the Edge developer tools and choose the Sources tab, no source code is displayed for the main file. All of the included scripts display no problem when clicked on. Most pages in this project will load the sources just fine, but there are a very few with this issue. I've tried Googling for an answer but all I get is How-Tos on using Edge developer tools.
2 Answers
According to your description, I successfully reproduced your problem through the following steps:
- Open the developer tool to view the page
source code
- If it is not displayed, click the main file
- Close the main file, like this:
4. Restart the page and open the developer tool to view source code
I'm not sure if you have done something similar to cause this problem. If you haven't closed it, the page code will be displayed in the source tab when you open it.

- 1,463
- 1
- 4
- 9
-
Hmm... It's possible I could have done something like that. I use this tool all the time, but this behavior is a recent phenomenon. Oh, and I tried the same page in Chrome, and it works just fine. I have not tried Firefox yet. – CB_Ron Aug 27 '21 at 15:55
-
1According to your description, I also did the same test in Chrome, and it has the same result as Edge. I think this may be related to browser cache. – Xudong Peng Aug 30 '21 at 09:02
I have had the same problem and fixed it by removing all comments. refreshing the page and opening the source again.
specifically this style of comment
/*comment*/
this style seems to be allowed
//comment
you can use a find and replace - replacing this
/\*.*?\*/
with blank space to delete all such offending comments using regular expression, see if it works for you, if so then i guess replace your comment blocks with single line comments.
in my example i am using a file.html file, it has a javascript and the code works fine with
/**/
comments but it seems dev tools does not play well with that style of comment, i've tested it and html style comments work fine, that's
<!-- comment -->
-
Interesting! But I have not experienced the issue lately. Now the issue I am experiencing is that code, after a certain point, no longer has syntax highlighting. I'm going to do some experimentation and see if your workaround for the other problem works for this, too. Unfortunately, I have several hundred pages on this site, many of which use that style of commenting for JS. – CB_Ron Aug 04 '23 at 17:49