I am trying to debug create-react-app and when I put a breakpoint on an arrow function I have invalid value inside of this keyword and completely strange behavior of stopping breakpoints (the devtools don't allow to put a breakpoint at a valid js expression, it looks like disabled for a breakpoint. I checked on both FF and Chrome browsers. However, when I change arrow function (()=>{}) to the function(){} declaration, the debugging behavior is correct. Does anyone know what the issue is and what react start up project would you recommend where arrow functions are debugged correctly?
My code in App.js looks like here. Try to put a breakpoint inside of the line:
this.setState({value: this.state.value + 1})
this should be App but it's not the case. It is undefined at this particular breakpoint, although the app's behavior is correct. I suspect something is broken with sourcemaps... What are react projects out there with good setup with webpack that handles sourcemaps correctly?
this, but they have thethisof the enclosing lexical scope instead.thisshould beAppbut it's not the case. It isundefinedat this particular breakpoint, although the app behavior is correct. I suspect something is broken with sourcemaps.