Removing a 't' destroys the debugger source page
Categories
(DevTools :: Debugger, defect, P2)
Tracking
(Not tracked)
People
(Reporter: philiprbrenan, Unassigned)
Details
Attachments
(4 files)
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>
Reporter | ||
Comment 1•2 years ago
|
||
Here is the display I get if the 't' is not removed.
Reporter | ||
Comment 2•2 years ago
|
||
Here is what I get as soon as I remove the 't' - normal service has resumed.
Comment 3•2 years ago
|
||
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.
Comment 4•2 years ago
|
||
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>
Reporter | ||
Comment 5•2 years ago
|
||
Please see the attached zip file for complete instructions to recreate the problem?
Comment 6•2 years ago
|
||
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.
Description
•