Debugging problem in Promise stepping (webstorm 2017.1.2, nodejs 6.10.1)
I have function, I want to stop at "resolve('hello')", currently the debug cursor cannot stop at it, I need to add "debugger" code on top of it. Anyone can help?
function abc() {
function test(schText) {
returnnew Promise((resolve, reject) => {
setTimeout(() => {
debugger;
resolve("hello");
}, 2000);
})
}
return test(schText).then((val) => {
return val;
});
}
Please sign in to leave a comment.
When debugging client-side code using JavaScript Debug run configuration, you need to tick Async checkbox to be able to hit breakpoints in async functions (https://blog.jetbrains.com/webstorm/2016/01/webstorm-12-144-2925/):
Unfortunately this feature is not currently available for Node.js debugging, please vote for https://youtrack.jetbrains.com/issue/WEB-19876