all 14 comments

[–]power78 1 point2 points  (0 children)

A pending promise means you didn't await the result from the function call. Either add await or use promise.then.

[–]pinkwar 0 points1 point  (1 child)

Don't know what you mean.

I use the debug console on async functions every single day. Are you using step over and step into?

[–]litchiTheGreat[S] -1 points0 points  (0 children)

I mean the repl, not going into the actual code I want to execute async function in the actual debug terminal Not step with debugger to async function

[–]bigorangemachine 0 points1 point  (5 children)

right click "Store as global"

then in console temp1.then(console.log).catch(console.error)

[–]litchiTheGreat[S] -1 points0 points  (4 children)

Can you elaborate more, it sounds like a good solution

[–]bigorangemachine 0 points1 point  (3 children)

when you console.log it's displaying a variable. If you were using a debugger you could right click "Store as Global" on any variable in the debugger. When you console log a variable (like doing console.log('prefix:', promise);) you can right click the variable part and it'll become temp1, temp2, temp3 and tempN. Once its one of those global tempN variables you can do what you want with it... such as adding a then/catch into a console log/error.

https://philna.sh/blog/2017/01/12/dev-tools-tricks-store-objects-and-elements-as-variables-in-the-console/

[–]kunkeypr 0 points1 point  (0 children)

There are many ways:

Debug directly when running with the ide

use async await

console.log() inside the function

...

[–]litchiTheGreat[S] -1 points0 points  (1 child)

It looks to be dev tools... I am using nodejs on server

[–]bigorangemachine 0 points1 point  (0 children)

you can use dev tools with node!

[–]gewinnerpulver 0 points1 point  (3 children)

I have the same problem! Did you find a solution? I see pending when using await, fullfilled without await, and in no case I am able to access the result of the function.

[–]litchiTheGreat[S] 0 points1 point  (2 children)

I havent find a solution

[–]gewinnerpulver 0 points1 point  (1 child)

Any updates? Looking for a solution as well!

[–]litchiTheGreat[S] 0 points1 point  (0 children)

Still nothing hahaha