我在 file-A.js 中有这段代码
SugarBee.prototype.doubleClicked = function(canvas){
debugger;
this.createPropertyEditor();
}
Firefox 调试器在我的函数的第一行停止,这正是我想要的。
所以我点击了两次“step in”按钮,我希望 firefox 的调试器将我带到 createPropertyEditor 函数定义,应该会发生什么,对吧?但是,调试器会跳转到 file-B.js 中的随机位置。
AjxDispatcher.require=function(n,a,h,s,r) {
if(!n) {
return
}
if(typeof(n)=="string") {
n=[n]
}
var l=[];
for(var o=0; o<n.length; o++){
var t=n[o];
if(!AjxDispatcher._getPackageData(t)._loaded) {
l.push(t)
}
}
>>>> if(l.length==0) {
return AjxDispatcher._postLoadCallback(n,false,h,s)
} else {
var e=AjxDispatcher._preLoad;
if(r&&AjxDispatcher._loadFunctionsEnabled&&e.length) {
AjxPackage.__log("pre-load function");
AjxDispatcher._timedAction=new
AjxCallback(null,AjxDispatcher._continueRequire,[l,a,h,s]);
for(var o=0; o<e.length; o++){
e[o].run()
}
window.setTimeout("AjxDispatcher._timedAction.run()",0)
} else {
return AjxDispatcher._continueRequire(l,a,h,s)
}
}
};
调试器跳转到标有“>>>>”的行
为什么会这样?