Created attachment 305994 [details] [Reduction] test page Summary: Unexpected execution highlight behavior when pausing in anonymous function. Test Page: <html> <script> (function() { debugger; })(); </script> </html> Steps to Reproduce: 1. Inspect test page 2. Reload page and pause for debugger statement => Execution highlight covers entire function => <html> tag is missing from editor 3. Resume debugger => <html> tag reappears 4. Remove <html> tag from file, repeat test => Behaves normally
Created attachment 305996 [details] [Image] unexpected execution highlight Also note the missing <html> tag
This is currently the best behavior we have when pausing in an inline <script> on a non-fully document. This shouldn't have anything to do with pausing in an anonymous function. This is a special code path. Namely, if we are paused inside of a document that hasn't completed loading, the frontend doesn't know how to request the document's contents, but it can request the script's contents so it shows the script without surrounding HTML code. We can improve this scenario.