Node2-6环境&调试----debug

13_debug.js

//测试的脚本
function test1() {
    const a = parseInt(Math.random() * 10);
    const b = parseInt(Math.random() * 10);
    const c = test2(a, b)
}

function test2(a, b) {
    if (a > b) {
        a += a * 2
    } else {
        b -= a
    }
    return a + b;
}

test1();

运行代码:

接着 打开chrome://inspect/#devices

进入调试环境

猜你喜欢

转载自www.cnblogs.com/chorkiu/p/11415632.html