Javascript - It is possible to retrace the origins of a value of a Javascript variable with the dev.console?

91 views Asked by At

I'm working with React Redux. Seems there is a overwritting of values in my code. My this.props of a connected (mapStateTo...) component come from an unknow part of my code.

My quest is directly linked to an another quest about understanding why my React.Component doesn't update when the store.state updates.

I'm trying to retrace currently the origins of the value in Javascript. My console displays me the line of the code but not the origins of the this.props of my file directly in the console.

My problem is that I have a this.props but can't figure out to which part of my code it correspond.

On my console I have access to map.file but fail to find the origin of my this.props, would be great if a method permit it.

Thanks

1

There are 1 answers

3
V. Sambor On

If the console displays the output, then enter to debug mode, put a breakpoint where you are printing and follow the execution stack trace, so you can see the code flow and where your prop has been initialized...