New issue
Advanced search Search tips

Issue 818096 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Debugger in inline events is not properly displayed in DevTools

Reported by hakerh403@gmail.com, Mar 2 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3470.23 Safari/537.36

Steps to reproduce the problem:
1. Create a Chrome extension
2. In background script disable content security policy
3. In a content script execute an inline event at document start
4. In that inline event override `addEventListener` property of the `EventTarget` prototype with a proxified object
5. In the `apply` proxy trap call the debugger using `debugger` statement
6. Navigate to any webpage
7. Open Chrome DevTools
8. Press any button on that webpage

What is the expected behavior?
Expected behavior is to pause the debugger at `debugger` statement like in all other JavaScript files.

What went wrong?
Debugger is actually paused where it should be paused, but in the `Sources` tab of the DevTools, instead of displaying the script at which the debugger is paused, Chrome currently displays the html file of the webpage.

If the steps mentioned above seem confusing or unclear, I'm attaching here an example minimal extension and a webpage you can test the extension on. Notice, I tested this on Chrome 63.0.3239.132, I'm not sure if it reproduces in other versions.

Did this work before? N/A 

Chrome version: 63.0.3239.132  Channel: stable
OS Version: 6.3
Flash Version: /
 
Labels: Needs-Milestone
I've just notice there are some mistakes in my original script. I'm re-uploading the fixed script here which reproduces the issue always.
1.zip
4.6 KB Download

Comment 3 by alph@chromium.org, Mar 2 2018

Components: -Platform>DevTools Platform>DevTools>JavaScript
Owner: kozy@chromium.org
Status: Assigned (was: Unconfirmed)

Sign in to add a comment