Some files are linked and others are not... why?

1655 views
Skip to first unread message

Jean-Sébastien Petit

unread,
Dec 20, 2018, 5:21:00 AM12/20/18
to Chrome DevTools
I use Chrome DevTools for .js files debugging, and I appreciate the fact that when you update the file in DevTool, the physical file is saved as well.

However, not all my files are linked that way, and I can't figure out why.

I'm using localhost on my local IIS, and some files are linked, some are not, some folders are linked, and some are not.

Those that are not linked show up in (no domain), and those which are linked are under their respective folder.

Workspaces are setup on those folders as well. In fact, it has no effect than putting a green dot beside the file's icon.


The tooltip for linked files show the full url, while for those which are not it's only the relative path.

I checked:
  • the size: Nope, some files that are linked and not linked are about the sane size, I have big and small files on both sides
  • the complexity: nope, same as the size
  • the code page: UTF-8 all around
  • the loading order: some files that are linked are loaded before some that are not.
I checked the network tab and all files are properly downloaded, and are not from (memory cache).

So I'm at a loss. Any tips that you can give me to settle this would be welcome.


Setup: 
Chrome Version 71.0.3578.98 (Official Build) (64-bit)
on Windows 10

Jean-Sébastien Petit

unread,
Feb 5, 2019, 2:31:42 PM2/5/19
to Chrome DevTools
Ok, the culprit was a line added by he previous devs:

//# sourceURL={some file}

Somehow it prevented DevTools from linking the file correctly, probably because of relative path issues.

I removed it and DevTools now see the file correctly...!

Joe Rocci

unread,
Aug 19, 2019, 11:42:29 AM8/19/19
to Chrome DevTools
I'm having a similar problem. The files in the file system marked as "linked to..." (green dot) are fine but the files not marked as linked don't respond to breakpoints, etc. Is there a way to re-establish the linkages between the file system and the target?

Joe

Roger Kaplan

unread,
Sep 17, 2019, 3:15:03 PM9/17/19
to Chrome DevTools
Just lost 2 hours with this.

My symptom is that every time I edited the file within Chrome Devtools (either sources pane or thru CSS editor) the file unlinked. "Save As" saved files to disk but reload didn't show changes. That was my clue.
Go to devtool settings and tick "Disable cache (when devtools is open)".  The problem was chrome was caching the original version of the file and was smart enough to know that the changed file was different.

Ugh.

Dave

unread,
Feb 18, 2020, 2:33:09 AM2/18/20
to Chrome DevTools
I had the same issue but the cause was unicode characters. After I deleted the unicode chars, the file was remapped which allowed devtools to detect file 'changes' again.

Benny Karlson

unread,
Apr 17, 2020, 3:29:44 PM4/17/20
to Chrome DevTools
I confirm it works -- after removing non-latin characters all my files are linked now... clearly a bug. 

jebum Lee

unread,
Nov 5, 2020, 6:59:02 AM11/5/20
to Chrome DevTools
 Instead of removing unicode chars, inserting  @charset "utf-8"  top of the css file make it work. Btw weird...
2020년 4월 18일 토요일 오전 4시 29분 44초 UTC+9에 Benny Karlson님이 작성:
Reply all
Reply to author
Forward
0 new messages