why chrome-dev-tools can't reflect 'this' correctly in a promise?

Viewed 194

I use webpack to compile my project, and then I found this will be compiled to _this2 if there is a promise.

And the problem is that when I take a breakpoint in the promise, this will always be undefined in chrome-dev-tools.

Is it a bug? Is it difficult for Chromium develop team to resolve this?

Now, the source code:

enter image description here

the compiled code by webpack:

enter image description here

because there is a source-map, chrome will display the source code for me, and this outside the promise will be correctly inspected.

enter image description here

but, this inside the promise will be undefined

enter image description here

1 Answers
Related