【发布时间】:2016-03-31 16:59:05
【问题描述】:
我曾经能够在 javascript 函数中设置断点并更改变量值以进行调试。直到最近(在一两周内),这种方法才有效。
这是一个例子:
function test(params) {
var result = params.num * 2;
// if I put a break point here and change result = undefined,
// it doesn't work
return result;
}
// I should get 6, but when debugging and changing result to undefined,
// I should get undefined in my output, used to, not anymore
var x = test({ num: 3 });
console.log(x);
我正在使用 OSX Yosemite Chrome v. 49.0.2623.110(64 位)
它是最新的,我刚刚重新启动了 Chrome。
我一直这样做,但最近发生了一些事情,我不能再这样做了。任何帮助将不胜感激。
谢谢
【问题讨论】:
标签: google-chrome debugging developer-tools