Ziv polack
Ziv polack

Reputation: 59

viewing promise result in debug mode javascript

I'm using Intellij for debugging my NodeJS app, and while on debugging mode,

I've been wondering if that would be possible to use the Debugger console to execute a promise (including a http request) and view it's result.

I've only managed to get the console to print me it's a Promise, but I'm looking to get the result, similar to the functionality Google chrome is offering.

Upvotes: 0

Views: 1269

Answers (1)

shkaper
shkaper

Reputation: 4988

You can launch Node.js in debugging mode, e.g. node --inspect index.js. It prints a link that when pasted in Chrome, opens debugger with the same features you'd see in a regular Chrome dev tools.

See https://nodejs.org/en/docs/guides/debugging-getting-started/

Upvotes: 1

Related Questions