Breakpoint appears on wrong line number
Reported by
m...@mostlystatic.com,
Apr 25 2016
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36 Steps to reproduce the problem: 1. Run site as described here https://github.com/pierre-hilt/babel_webpack_sourcemap 2. Make sure source maps are built (npm run build-sm) 3. Go to App.jsx 4. Set breakpoint on line 3 What is the expected behavior? A breakpoint is added to line 3 What went wrong? The breakpoint is added to line 24 Did this work before? N/A Chrome version: 49.0.2623.112 Channel: stable OS Version: OS X 10.11.2 Flash Version: Shockwave Flash 21.0 r0 I know statement mapping in source maps can be unclear sometimes, but in this case I don't see why Chrome doesn't behave as expected. I've loaded the source file and source maps into the visualizer here: http://tinyurl.com/hvq7ybx (This issue is based on this StackOverflow question which describes a similar problem with the same code example. http://stackoverflow.com/questions/36841163/cant-set-breakpoint-in-chrome-with-babel-and-webpack)
,
Jun 24 2016
Update to Chrome 51 for fix
,
Jul 29 2016
,
Oct 1 2016
Thanks for great repro.
In ToT it jumps to line 21 (not 24) and on step in on this line debugger will go into some initialization code, on stepOver into line 24.
It's because this code without source map looks like:
var a = (function() {
..
})()
And V8 move breakpoint to function call. So work as intended. Feel free to reopen issue.
|
|||
►
Sign in to add a comment |
|||
Comment 1 by allada@chromium.org
, Apr 25 2016Status: Available (was: Unconfirmed)