我想调试一个简单的nodejs readline程序。如何调试nodejs readline应用程序?
var readline = require("readline");
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
rl.question("What's your name \n",function(answer){
var x =10; // set the break point here
console.log("your name is ",answer);
rl.close();
});
我在var x = 10设置断点; rl.question()的内部回调函数,但是断点从来没有命中。
为什么会发生这种情况我很困惑。
然后如何调试readline程序。