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
进入调试环境