Open Bug 1785760 Opened 2 years ago Updated 2 years ago

Removing a 't' destroys the debugger source page

Categories

(DevTools :: Debugger, defect, P2)

Firefox 103
defect

Tracking

(Not tracked)

People

(Reporter: philiprbrenan, Unassigned)

Details

Attachments

(4 files)

Attached file count2.html

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0

Steps to reproduce:

When I display the attached file in the debugger it shows just </html> on line 1 and nothing else. If I remove the 't' of 'to' on line 24 normal service resumes - I see the full file in the debugger as expected.

Actual results:

As above. I would like to include more screenshots but your (antiquated) bug system only allows for one file attachment.

Expected results:

All of the file should have displayed in the debugger not just the word </html>

Here is the display I get if the 't' is not removed.

Here is what I get as soon as I remove the 't' - normal service has resumed.

The Bugbug bot thinks this bug should belong to the 'DevTools::Debugger' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Debugger
Product: Firefox → DevTools

Thanks for reporting.
I see the current code (as seen below) on the page you sent seems to work fine.
But its not clear where the t was on line 24?
Can you please paste the code (which includes the t) that breaks, here so we can try to reproduce .

thanks

<!DOCTYPE html>
<html>
<body><h1>Hello</h1></body>
<script>
function count (str, ch){ 											            // creates a function called 'count' that counts # of letters
	for (const c of str) {											            //characters of the string
		if (c == ch){												            //if character = letter "y"...
			j = j + 1 												            //adds 1 for each character it recognizes
		}
	}
}
function countn (str, characters){ 											            // creates a function called 'count' that counts # of letters
	for (const c of characters) {
												            //characters of the string
		if (c == characters){												            //if character = letter "y"...
			j = j + 1 												            //adds 1 for each character it recognizes
		}
	}
}
if (1){
	const s = "abc"
	console.log("AAAAA")
	const c = countn(s, "bd")                                                     // Count # of letters
	console.log(s, c, "should be 10")                                           // Printing to s
}
</script>
</html>
Flags: needinfo?(philiprbrenan)
Attached file Bug1785760.zip

Please see the attached zip file for complete instructions to recreate the problem?

Flags: needinfo?(philiprbrenan)

Thanks a lot for the detailed STRs, we managed to reproduce. It seems that any change can actually trigger this, but the key is to first open devtools and the debugger on this source, perform the change and then reload the page.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: