firefox-devtools / debugger

The faster and smarter Debugger for Firefox DevTools 🔥🦊🛠
https://firefox-dev.tools/
4.61k stars 758 forks source link

Cant access this context after promise return #8297

Closed roqueorts closed 3 years ago

roqueorts commented 3 years ago

Hi, I would like to know why i cant see on the debugger the context 'this' object. It is as undefined on firefox debugger, but it appears on chrome debugger.

The code of my ts file is:

export class MYClass {
refresData(): void {
this.myService.getFunction(1)
      .then(result => {
        this.myProperty = result; // This object appears as undefined
 }
}
}

The code of service:

async getFunction(id: number): Promise<MyObject> {
    return of({...}).toPromise();
  }

Version 82.0.2 (64-bit) on Windows 10

janodvarko commented 3 years ago

Cloned into Bugzilla https://bugzilla.mozilla.org/show_bug.cgi?id=1695642

Firefox Developer Tools (including Debugger tool) development is now entirely happening in Bugzilla and new issues should be reported here: https://bugzilla.mozilla.org/enter_bug.cgi?product=DevTools&component=Debugger

Honza