Tuesday, 4 June 2019

Is there a way to evaluate promise in nodejs without resuming debugger?

If i type debugger and I want to check something. But call to that function returns a promise, then i am stuck.

For example:

I typed debugger and it stopped.

function test(db) {
    debugger;
    // here i want to see something
    var a = .....;
}

But if I type

let d = db.User.create(); 

I'll get

Promise { pending }

now there is no recourse. I can't simply evaluate promise. Kinda make whole debugger less useful.

This would have been no problem, if it was synchronous, i'd have been able to jump in mid program, check out few things and modify program to my liking then run rest of the program.



from Is there a way to evaluate promise in nodejs without resuming debugger?

No comments:

Post a Comment