Visual Studio代码-调试Angular中的Promise回调

Visual Studio代码-调试Angular中的Promise回调,angular,promise,visual-studio-code,angular-promise,Angular,Promise,Visual Studio Code,Angular Promise,我在VS代码中安装了以下扩展: 调试器可以工作,但是我不能在承诺回调中设置断点。例如: getCatWishesFromBackend() : Promise<string[]> { return this.http.get("http://localhost:3000/api/values").toPromise() .then(response => response.json().wishes as string[])

我在VS代码中安装了以下扩展:

调试器可以工作,但是我不能在承诺回调中设置断点。例如:

  getCatWishesFromBackend() : Promise<string[]> {
    return this.http.get("http://localhost:3000/api/values").toPromise()
                    .then(response => response.json().wishes as string[]);
  }
getCatWishesFromBackend():承诺{
返回此.http.get(“http://localhost:3000/api/values).toPromise()
.then(response=>response.json()。希望为字符串[]);
}
我想为代码的这一部分设置一个断点,即then()部分中的内容


我该怎么做?如果我在then()行中设置断点,它只会在调用this.http.get()时停止程序。调用回调时,将不考虑断点。

只需添加一个enter并将其用大括号括起来(较长的箭头函数表示法)。确保添加
返回

return this.http.get("http://localhost:3000/api/values").toPromise()
   .then((response) => { 
      return response.json().wishes as string[]
   });

只需添加一个enter并用大括号(更长的箭头函数表示法)将其括起来。确保添加
返回

return this.http.get("http://localhost:3000/api/values").toPromise()
   .then((response) => { 
      return response.json().wishes as string[]
   });