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

Issue 630962 link

Starred by 5 users

Issue metadata

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



Sign in to add a comment

Can not set breakpoint if JS contains ES6 function export

Reported by lbrac...@gmail.com, Jul 25 2016

Issue description

Chrome Version       : 51.0.2704.103
OS Version: OS X 10.11.4

What steps will reproduce the problem?
1. Create JS file containing ES6 function export

```
// Export example
export function demo() {
  return true;
}
```
2. Open Inspector -> Source -> Open that source file.
3. Set breakpoint somewhere

What is the expected result?
Breakpoint positioned on exact line it was placed.

What happens instead of that?
Breakpoint is miss placed.


If you export function as const it will work as expected.
```
// Works normally
export const demo = function () {
  return true;
}
```

UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36



 
Cc: durga.behera@chromium.org
Components: Platform>DevTools>JavaScript
Labels: Needs-Feedback M-53
lbracano@ ; Thanks for the report.Could you please help providing more description or a jsfiddle/url to triage from Test Engg side and if possible a screen cast describing the issue.
Project Member

Comment 2 by sheriffbot@chromium.org, Jul 27 2016

Labels: -M-53 M-54 MovedFrom-53
Moving this nonessential bug to the next milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: kozyatinskiy@chromium.org yangguo@chromium.org

Comment 4 by lbrac...@gmail.com, Jul 29 2016

Hi, here is screen record of the problem.

It is simple to reproduce.

Also if you change export (you'll see in video) to

export const example = function () {...}

You are going to be able to set breakpoint.

Hope it helps.
debugging.mov
626 KB Download
Owner: adamk@chromium.org
I can't replicate the issue. Are you using any ES6 compilation tools like Babel? 

Comment 7 by adamk@chromium.org, Aug 1 2016

"export const ..." is a syntax error in Chrome currently. As #6 asks, how are you loading this script into Chrome?

Comment 8 by lbrac...@gmail.com, Aug 1 2016

This occurs while debugging React Native.

Code should be transpiled with Babel but I am really not sure what happens under the hood. I am also not sure how RN communicates with chrome debugger.

I can confirm that his happens to other as well.

Do you have any hunch what may be the cause for this misinterpretation?
Does it use source map to map pre-Babel to post-Babel code? Maybe the source map is wrong around the export?
Project Member

Comment 10 by sheriffbot@chromium.org, Aug 16 2016

Labels: -Needs-Feedback Needs-Review
Owner: durga.behera@chromium.org
Thank you for providing more feedback. Adding requester "durga.behera@chromium.org" for another review and adding "Needs-Review" label for tracking.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 11 by adamk@chromium.org, Aug 18 2016

Labels: -Needs-Review Needs-Feedback
Owner: ----
Still needs feedback (answer to yangguo's #9)
Owner: kozyatinskiy@chromium.org
Status: Assigned (was: Unconfirmed)
Status: WontFix (was: Assigned)
Still needs user feedback. Marked as WontFix for now.
Thank  you for reporting and participating, feel free to reopen it.

Sign in to add a comment