Breakpoint "Script First Statement" doesn't work with new script from eval()
Reported by
patrickj...@gmail.com,
May 20 2017
|
|||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
Steps to reproduce the problem:
1. Use an HTML page that loads a Javascript file.
2. In this Javascript file there should be an eval() expression, e.g. eval("console.log('hello');");
3. Go to Event Listener Breakpoints and enable "Script First Statement"
4. Reload the page
What is the expected behavior?
Setting the instrumentation breakpoint "Script First Statement" should work the same for dynamic code as it does for regular scripts. Execution should be paused as soon as the first statement of the code is about to be executed.
What went wrong?
Execution is not paused.
Did this work before? No
Chrome version: 58.0.3029.110 Channel: stable
OS Version: OS X 10.12.4
Flash Version: Shockwave Flash 25.0 r0
This functionality is very useful to find the script entry points of a website. Another imporant scenario is script instrumentation: When using the Chrome Debugging Protocol, the event Debugger.scriptParsed is also being called for dynamically created scripts which is great. But the instrumentation breakpoint scriptFirstStatement doesn't which is necessary if I want to instrument code. By the time I call setScriptSource, the code already executed and it's too late.
,
May 23 2017
Thanks for the report. Assigning to kozy@, who might know how feasible it is to implement this for dynamic scripts.
,
Oct 16 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by kavvaru@chromium.org
, May 22 2017