1

This is quite bizarre. I have an object with a boolean property. I want to see how it's doing so I do a console.warn, which gives me the expected result. However, if I put a breakpoint on the console.warn and display the variable through my dev tools console, I get undefined. What is going on?

This is what my code roughly looks like:

export default class {
  constructor () {
    this.myProperty = true
  }

  doStuff () {
    return {
      doSomething: (...args) => {
        console.warn('this.myProperty', this.myProperty) // will display true
        // If I put a breakpoint on the console.warn and print it through my dev tools, it will display undefined.
      }
    }
  }

}
Bergi
  • 630,263
  • 148
  • 957
  • 1,375
theJuls
  • 6,788
  • 14
  • 73
  • 160

1 Answers1

1

As Bergi mentioned, it looks like this is a Chrome bug: https://crbug.com/760225

Kayce Basques
  • 23,849
  • 11
  • 86
  • 120