Open Bug 1829460 Opened 3 years ago Updated 3 years ago

Display inconsistency of sourceURL containing a URL

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: erosman, Unassigned)

Details

Attachments

(4 files)

Attached image sourceURL2.png

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
Summary: Display inconsistency of sourceURL with URL → Display inconsistency of sourceURL containing a URL

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.

Attached image sourceURL5.png

sourceURL scheme changed to lowercase

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

Flags: needinfo?(eros_uk)
Severity: -- → S3
Priority: -- → P3

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.

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

<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 sourceURL e.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

  • FireMonkey is changed to lowercase (UserScript stays 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

Flags: needinfo?(eros_uk)
Attached image sourceURL6.png

Test page Debugger

Attached image sourceURL7.png

Test page Debugger 2

Thanks for the examples, I updated https://firefox-devtools-debugger-sources-tree.glitch.me/ and it does show the issue

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: