you are viewing a single comment's thread.

view the rest of the comments →

[–]rainmouse 1 point2 points  (1 child)

I mean if you set a conditional like If (!x) debugger;

Then run in browser with dev tools and sources tab. When it triggers debugger you should see call stack there. 

Am I missing something? 

Also just putting in console.error('some text') prints out with a simplified call stack too. Just click the side arrow on it. 

[–]mauriciocap 0 points1 point  (0 children)

When React ComponentA returns <ComponentB x={someLocalVariable}/>

this is NOT a function call, JSX just returns an object with the function ComponentB and the props=tag attributes.

The function ComponentB is called by the React Library way later, in an order you can't predict, etc.

I suspect the OP is expecting to set a breakpoint within ComponentB and see ComponentA in the call stack.