最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - WebStorm Async Await debug Node.js Sails.js - Stack Overflow

programmeradmin1浏览0评论

I can't debug an async "await" instruction. I always have a promise. I have seen that there is an "Async" button where the red square is in the picture but I don't have it.

Here is the run config:

When I evaluate the expression:

In the documentation of WebStorm you can see that there is the "Async" checkbox.

Does anyone have an idea how I can debug and the result of an await?

I can't debug an async "await" instruction. I always have a promise. I have seen that there is an "Async" button where the red square is in the picture but I don't have it.

Here is the run config:

When I evaluate the expression:

In the documentation of WebStorm you can see that there is the "Async" checkbox.

Does anyone have an idea how I can debug and the result of an await?

Share Improve this question edited Mar 11, 2020 at 17:38 LazyOne 166k48 gold badges414 silver badges415 bronze badges asked Mar 11, 2020 at 14:29 Hassen Ch.Hassen Ch. 1,7731 gold badge20 silver badges32 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

Async checkbox has been removed from debugger UI, async stack traces are always enabled. To evaluate the value of promise use await operator, like await getPromise(). Unfortunately due to JavaScript engine limitations (https://bugs.chromium/p/chromium/issues/detail?id=833928) value of Promise can be obtained only when execution is not stopped at a breakpoint:( You can try evaluating the value during code execution in debugger (when execution is not suspended)

发布评论

评论列表(0)

  1. 暂无评论