New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 606380 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Oct 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Breakpoint appears on wrong line number

Reported by m...@mostlystatic.com, Apr 25 2016

Issue description

UserAgent: 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)
 
bp-wrong-line.gif
58.0 KB View Download
Screen Shot 2016-04-25 at 17.19.27.png
81.3 KB View Download

Comment 1 by allada@chromium.org, Apr 25 2016

Owner: kozyatinskiy@chromium.org
Status: Available (was: Unconfirmed)

Comment 2 Deleted

Update to Chrome 51 for fix
Status: Assigned (was: Available)
Status: WontFix (was: Assigned)
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