Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging doesn't work as expected on line #150

Closed
digeff opened this issue Mar 14, 2016 · 2 comments
Closed

Debugging doesn't work as expected on line #150

digeff opened this issue Mar 14, 2016 · 2 comments
Labels
known-issues Known issues for extension, most of them are external issues

Comments

@digeff
Copy link
Contributor

digeff commented Mar 14, 2016

Set a breakpoint on lines 75 and 81 of MovieScreen.js of the Movies React-Native sample application:
https://github.com/facebook/react-native/blob/cd89016ee7168bb6971f800779e0878e9a70206f/Examples/Movies/MovieScreen.js#L75

Step into the code when the debugger hits those lines. The debugger is not going into the method getTextFromScore which is what I'd expect it to do.

@digeff digeff added the bug label Mar 14, 2016
@MSLaguana
Copy link
Member

This looks like a consequence of the way JSX compiles down into javascript. The JSX block there corresponds to something like the following javascript:

return (
React.createElement(View,null,
React.createElement(View,{style:styles.rating},
React.createElement(Text,{style:styles.ratingTitle},'Critics:'),
React.createElement(Text,{style:[styles.ratingValue,getStyleFromScore(criticsScore)]},
getTextFromScore(criticsScore))),


React.createElement(View,{style:styles.rating},
React.createElement(Text,{style:styles.ratingTitle},'Audience:'),
React.createElement(Text,{style:[styles.ratingValue,getStyleFromScore(audienceScore)]},
getTextFromScore(audienceScore)))));

Note that there is only one statement there, and the whole thing is compiled into one nested function invocation. There is no intermediate point that we can set a breakpoint where some part of that has executed but the getTextFromScore line has not, or at least I could not in the node debugger.

@ghost ghost added known-issues Known issues for extension, most of them are external issues external and removed bug labels Mar 30, 2016
@ghost ghost self-assigned this Mar 30, 2016
@mbraude
Copy link
Contributor

mbraude commented Aug 23, 2016

Chrome does not support this functionality.

@mbraude mbraude unassigned ghost Aug 23, 2016
@mbraude mbraude closed this as completed Aug 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
known-issues Known issues for extension, most of them are external issues
Projects
None yet
Development

No branches or pull requests

3 participants