Issue metadata
Sign in to add a comment
|
Breakpoints cease to work after reloading script using sourceURL
Reported by
sharonro...@gmail.com,
Jun 24 2016
|
||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36
Steps to reproduce the problem:
1. open the dev tools console
2. input: eval('const x = 1;\nconsole.log(x);\n//# sourceURL=somescript.js')
3. input: eval('const x = 2;\nconsole.log(x);\n//# sourceURL=somescript.js')
4. Open the somescript.js source and try to set a breakpoint
What is the expected behavior?
Breakpoint should be set and work correctly
What went wrong?
Breakpoints not being added when clicking line number. It is possible to right click the line number and add a breakpoint. It doesn't show but reloading the script makes execution stop there. The breakpoint then appears, is dimmed (inactive) and I can't remove it. Deleting it from the breakpoints tab seems to work but reloading the script once more makes execution stop on the same (presumably removed) breakpoint.
Did this work before? N/A
Chrome version: 51.0.2704.103 Channel: n/a
OS Version: 10.0
Flash Version: Shockwave Flash 22.0 r0
This technique is used in SystemJS for example, for reloading scripts.
,
Aug 25 2016
,
Oct 4 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c0d25adc44ebd36c2dc2565942a1884479c40004 commit c0d25adc44ebd36c2dc2565942a1884479c40004 Author: kozyatinskiy <kozyatinskiy@chromium.org> Date: Tue Oct 04 00:22:56 2016 [DevTools] Fixed breakpoints in hotreloaded scripts We need to use last arrived script for ResourceScriptFile. Otherwise _isDiverged check will always return true in case of: eval("source1 //# sourceURL=foo.js") eval("source2 //# sourceURL=foo.js") BUG= 617450 , 623150 R=lushnikov@chromium.org Review-Url: https://codereview.chromium.org/2384953002 Cr-Commit-Position: refs/heads/master@{#422622} [add] https://crrev.com/c0d25adc44ebd36c2dc2565942a1884479c40004/third_party/WebKit/LayoutTests/inspector/sources/dont-diverge-script-evaluated-twice-expected.txt [add] https://crrev.com/c0d25adc44ebd36c2dc2565942a1884479c40004/third_party/WebKit/LayoutTests/inspector/sources/dont-diverge-script-evaluated-twice.html [modify] https://crrev.com/c0d25adc44ebd36c2dc2565942a1884479c40004/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js
,
Oct 4 2016
,
Oct 4 2016
,
Oct 4 2016
,
Oct 4 2016
[Automated comment] Less than 2 weeks to go before stable on M54, manual review required.
,
Oct 6 2016
This looks pretty safe and it would be good to get this in for stable. Approved for merging into M54.
,
Oct 6 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/31c32c71acf292764248bb6716772ee9453c0fe5 commit 31c32c71acf292764248bb6716772ee9453c0fe5 Author: Alexey Kozyatinskiy <kozyatinskiy@chromium.org> Date: Thu Oct 06 00:41:55 2016 [DevTools] Fixed breakpoints in hotreloaded scripts We need to use last arrived script for ResourceScriptFile. Otherwise _isDiverged check will always return true in case of: eval("source1 //# sourceURL=foo.js") eval("source2 //# sourceURL=foo.js") BUG= 617450 , 623150 R=lushnikov@chromium.org Review-Url: https://codereview.chromium.org/2384953002 Cr-Commit-Position: refs/heads/master@{#422622} (cherry picked from commit c0d25adc44ebd36c2dc2565942a1884479c40004) Review URL: https://codereview.chromium.org/2397063002 . Cr-Commit-Position: refs/branch-heads/2840@{#659} Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607} [add] https://crrev.com/31c32c71acf292764248bb6716772ee9453c0fe5/third_party/WebKit/LayoutTests/inspector/sources/dont-diverge-script-evaluated-twice-expected.txt [add] https://crrev.com/31c32c71acf292764248bb6716772ee9453c0fe5/third_party/WebKit/LayoutTests/inspector/sources/dont-diverge-script-evaluated-twice.html [modify] https://crrev.com/31c32c71acf292764248bb6716772ee9453c0fe5/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js
,
Oct 12 2016
Verified the issue on Windows-10 using chrome latest Beta M54-54.0.2840.59 by following steps mentioned in the original comment. Observed the break points are being added correctly by clicking line number. Hence adding TE-Verified label.
,
Oct 27 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/31c32c71acf292764248bb6716772ee9453c0fe5 commit 31c32c71acf292764248bb6716772ee9453c0fe5 Author: Alexey Kozyatinskiy <kozyatinskiy@chromium.org> Date: Thu Oct 06 00:41:55 2016 [DevTools] Fixed breakpoints in hotreloaded scripts We need to use last arrived script for ResourceScriptFile. Otherwise _isDiverged check will always return true in case of: eval("source1 //# sourceURL=foo.js") eval("source2 //# sourceURL=foo.js") BUG= 617450 , 623150 R=lushnikov@chromium.org Review-Url: https://codereview.chromium.org/2384953002 Cr-Commit-Position: refs/heads/master@{#422622} (cherry picked from commit c0d25adc44ebd36c2dc2565942a1884479c40004) Review URL: https://codereview.chromium.org/2397063002 . Cr-Commit-Position: refs/branch-heads/2840@{#659} Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607} [add] https://crrev.com/31c32c71acf292764248bb6716772ee9453c0fe5/third_party/WebKit/LayoutTests/inspector/sources/dont-diverge-script-evaluated-twice-expected.txt [add] https://crrev.com/31c32c71acf292764248bb6716772ee9453c0fe5/third_party/WebKit/LayoutTests/inspector/sources/dont-diverge-script-evaluated-twice.html [modify] https://crrev.com/31c32c71acf292764248bb6716772ee9453c0fe5/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by pfeldman@chromium.org
, Jun 27 2016Status: Assigned (was: Unconfirmed)