this is undefined inside sfc vue method

Viewed 444

My problem is the following: while hovering over the variable while debugging inside the chrome devtools this is what I´m getting:

dev tools image

In the devtools console: console print

Anyone has any idea why this would be happening? This is really anoying since makes the debugging process much more troublesome!!! Any solution?

1 Answers

You should be able to access variable _thisN where N is 1 or 2, 3 ... in the console instead, which is provided by the Babel transpiler.

I think this is related to an optimization technique Chrome uses to clean up variables outside of scope. See Why does Chrome debugger think closed local variable is undefined? for further explanation.

Related