Chrome Devtools Console cant see variables

2019-09-02 06:54发布

问题:

I'm debbuging a React app, and Chrome is completely lost about the variables. I've disabled all extensions and chrome is updated.

The scenario: I've put a break point in the following line:

console.log('My name is', this.props.name)

When Chrome reached the breakpoint, without releasing it, I've tried to see it in Console tab.

Console Tab > this.props.name
"Uncaught TypeError: Cannot read property 'name' of undefined"

After that, I skipped the breakpoint, the code ran, and the 'My name is John' just appear in the console tab.

Any idea of why is this happening?