I can’t open source files from my browsers anymore. I don’t know why. It stops working something like 2 weeks ago. It seems that all my browsers are affected (all Chromium based, I even tried on a second PC).
When I open the devtools, I can see all the sources files on the page panel on the left but when I try to open one file by clicking on it or by pressing CTRL + P, this is what I got:
I’ve checked the .map file and I can see "sourceRoot":"file:///", so the URL of the files should be file:///C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/haxe/io/Bytes.hx and not with localhost prefix. Am I correct?
I think it’s related to a browser update and not openfl, but any help appreciated, thanks.
What can I do to fix that? I’m becoming crazy without sourcemaps
I have also tested Chromium 79, and it works! So for now I can use that to debug my projects but I need to find a solution to debug on up to date browers (browsers not working : chrome, opera, edge, firefox).
So I’ve just downloaded Chromium Version 100.0.4896.0 (Build de développement) (64 bits) which is supposed to be older that your version @gonzos and it doesn’t work (I have not found your specific version). What the heck is wrong?
I have downloaded and tested Chromium Version 96.0.4664.0 (Build de développement) (64 bits) and it works. So I can stick around with this version for a little while waiting for a fix.
Also I’ve found a workaround by adding in the .map file file:/// in each path in the sources variable. E.g: "sources":["file:///C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/app/Module.hx",...
So this could be needed in openfl if the Chromium team doesn’t provide any fix.
I think that source maps are generated by the Haxe compiler, so if any fix is needed, it will probably be there.
Which version of Haxe are you using? Maybe the source maps are generated somewhat differently by different versions of Haxe.
For instance, I am using Haxe 4.2.5, and I just did a fresh compile for html5 -debug. I see an empty "sourceRoot":"" in my .map file. Additionally, all paths listed in "sources" start with file:///. I didn’t need to add that manually, like you mentioned you had to do. It was already like that.
For the record again, for Chromium version 96 I pasted “929513” as the filter (Branch Base Position). For users in the world who need to enable the “Override software rendering list” flag in Mac OS 10.13 (probably just me), it doesn’t behave properly in Chromium 96, but 79 does work.