Debug React.js source code, not DOM response?

Is there a way to set a breakpoint in real React.js code and debug that code.

eg:.

var HelloMessage = React.createClass({
  render: function() {
    return <div>Hello {this.props.name}</div>; // Here goes breakpoint
  }
});

React.render(<HelloMessage name="John" />, mountNode);
      

Run codeHide result


I mean debugging actual React code, not compiled javascript code. Is there any solution (browser plugin, any IDE that supports this)?

I know that when they talk about debug response they mean the ability to see the DOM of React's shadow attack. The question is about debugging the actual script code.

Thank,

+3


source to share


2 answers


Have you tried adding a debugger directly inside the .jsx file? It works for me every time



+2


source


My mistake. Chrome debugger shows original source (jsx), not compiled javascript.



0


source







All Articles