Display inconsistency of sourceURL containing a URL
Categories
(DevTools :: Debugger, defect, P3)
Tracking
(Not tracked)
People
(Reporter: erosman, Unassigned)
Details
Attachments
(4 files)
Split from bug 1824910, there is an issue with displaying schemes in URLs as a sub-folder e.g. https:/.
Example:
//# sourceURL=moz-extension://f5dc...3411/userscript/IMDb%20Scout%20Mod/https://code.jquery.com/jquery-3.5.1.min.js
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Comment 1•3 years ago
|
||
I have also noticed that the code changes the scheme to Lowercase. e.g.
//# sourceURL=FireMonkey://UserScript/....
// --- or
//# sourceURL=FireMonkey:UserScript/....
will be shown as
firemonkey://
-- UserScript/....
While it is understandable in case of real schemes (http/https/...), they are not the only possibility.
| Reporter | ||
Comment 2•3 years ago
|
||
sourceURL scheme changed to lowercase
Comment 3•3 years ago
|
||
erosman, could you please give us detailed step so we can reproduce the issue?
I installed FireMonkey but couldn't get the debugger to show me a source tree like the one that is on your screenshots
Updated•3 years ago
|
Comment 4•3 years ago
|
||
Note that If I'm doing this from the webconsole (on any webpage, without addon):
eval("var foo = true; //# sourceURL=moz-extension://foo/userscript/IMDb%20Scout%20Mod/https://code.jquery.com/jquery-3.5.1.min.js");
eval("var foo = true; //# sourceURL=moz-extension://foo/userscript/IMDb%20Scout%20Mod/bar");
I won't be getting the same behavior and the source file name will be jquery-3.5.1.min.js and everything else will be under the file path.
| Reporter | ||
Comment 5•3 years ago
•
|
||
The screens are from FireMonkey's next version.
In the release version entries appear under user-script.
I will prepare an STR not requiring an extension.
STR
- Use a test HTML e.g. https://firefox-devtools-debugger-sources-tree.glitch.me/
- Add a few scripts e.g.
my file.js,my file1.js,my file2.js...
<script src="/my folder/my file.js" defer=""></script>
<script src="/my folder/my file1.js" defer=""></script>
<script src="/my folder/my file2.js" defer=""></script>
- Add
sourceURLe.g.
my file.js
console.log("file");
//# sourceURL=FireMonkey://UserScript/https://www.example.com/file.js
my file1.js
console.log("file1");
//# sourceURL=FireMonkey://UserScript/https://www.example1.com/file1.js
my file2.js
console.log("file2");
//# sourceURL=FireMonkey://UserScript/https://www.example2.com/file2.js
- Open the Test page in browser and check the Debugger
Result
FireMonkeyis changed to lowercase (UserScriptstays the same)- Debugger breaks to a new folder/directory at
https://
Please note the following screenshots for the above test.
In the second screenshot, sourceURL in files are divided into http & https
| Reporter | ||
Comment 6•3 years ago
|
||
Test page Debugger
| Reporter | ||
Comment 7•3 years ago
|
||
Test page Debugger 2
Comment 8•3 years ago
|
||
Thanks for the examples, I updated https://firefox-devtools-debugger-sources-tree.glitch.me/ and it does show the issue
Description
•