Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebStorm Async Await debug Node.js Sails.js

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. enter image description here

Here is the run config: enter image description here

When I evaluate the expression: enter image description here

In the documentation of WebStorm you can see that there is the "Async" checkbox. enter image description here

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

like image 814
Hassen Ch. Avatar asked Nov 01 '25 06:11

Hassen Ch.


1 Answers

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.org/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)

like image 186
lena Avatar answered Nov 03 '25 21:11

lena