gpt4 book ai didi

javascript - 使用开发人员工具单步执行 javascript 中的匿名函数

转载 作者:行者123 更新时间:2023-11-29 22:19:54 26 4
gpt4 key购买 nike

例如,我想检查名为“test”的变量。

(function() {
var test = function(){alert("hello");};
test();
})();

添加断点是执行此操作的唯一方法,还是有一些特定于 [chrome | 的 ninja-foo javascript |开发者工具]?

最佳答案

(function() {
var test = function(){alert("hello");};
debugger;
test();
})();

关于javascript - 使用开发人员工具单步执行 javascript 中的匿名函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13036642/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com