Closed Bug 1450200 Opened 7 years ago Closed 5 years ago

unable to set breakpoint inside script tag with type application/javascript

Categories

(DevTools :: Debugger, defect, P3)

60 Branch
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sbarex, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Firefox/60.0 Build ID: 20180326164103 Steps to reproduce: Insert a JS code in a script tag with type application/javascript. Open the developer tool, go to the debugger section and scroll the source to the code inside the script element. Actual results: The source lines number are grayed out and you can't add a breakpoint. But changing the script type to text/javascript and reloading the page, the lines number are black and you can insert the breakpoint. Tested on firefox 60.0b7 (64 bit) on macOs 13.3.3. Expected results: lines number are black and you can insert the breakpoint
Could you please provide a script for testing purposes?
Component: Untriaged → Developer Tools: about:debugging
Flags: needinfo?(sbarex)
This is a simple code: <html> <head> <body> <button type="button" onclick="test1()">test1 (application/javascript)</button> <button type="button" onclick="test2()">test2 (text/javascript)</button> <script type="application/javascript"> function test1() { debugger; var a = confirm('test?'); alert(a); } </script> <script type="text/javascript"> function test2() { var a = confirm('test?'); alert(a); } </script> </body> </head> </html> All the function works, but in the debugger I can insert breakpoint only inside the second script tag (all lines on first script tag are gray-outed). Notice that the debugger instruction inside test1 works correctly.
Flags: needinfo?(sbarex)
Product: Firefox → DevTools
Url to repro: https://spark-walrus.glitch.me/ Probably a valid debugger bug.
Status: UNCONFIRMED → NEW
Component: about:debugging → Debugger
Ever confirmed: true
Priority: -- → P3

Honza, could you try and reproduce?

Flags: needinfo?(odvarko)

This should be fixed in the latest debugger, closing.

Honza

Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(odvarko)
Resolution: --- → WORKSFORME

But now I cannot put break points inside tag script without type tag or with type="text/javascript".
tested on firefox 67.0, macos 10.14.5

Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---

Could you open a new bug for this with an STR?

Status: REOPENED → RESOLVED
Closed: 6 years ago5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: