function __ttStart(files,entry,prefix,initial,debug){
    const stack=[],cache=Object.create(null);
    function inspect(v,depth=0,seen=new Set()){
        if(v===null||["string","boolean"].includes(typeof v))return v;
        if(typeof v==="number")return Number.isFinite(v)?v:String(v);
        if(typeof v!=="object")return String(v);
        if(seen.has(v)||depth>=4)return "[…]";
        seen.add(v);
        const out=Array.isArray(v)?[]:Object.create(null);
        for(const k of Object.keys(v).slice(0,100)){
            const d=Object.getOwnPropertyDescriptor(v,k);
            out[k]=d&&"value" in d?inspect(d.value,depth+1,seen):"[访问器]";
        }
        seen.delete(v);return out;
    }
    const native=(name,...args)=>JSON.parse(__native("dbg."+name,JSON.stringify(args)));
    function frames(){return stack.slice().reverse().map(f=>{
        const vars=Object.create(null);
        for(const [k,read] of Object.entries(f.get?.()||{})){try{vars[k]=inspect(read())}catch{}}
        return {file:f.file,line:f.line,name:f.name,vars};
    })}
    const api={
        enter(file,name){stack.push({file,name,line:1})},
        leave(){stack.pop()},
        error(e){const f=stack[stack.length-1];if(e && typeof e==="object" && !e.__ttLocation)e.__ttLocation=f.file+":"+f.line},
        hit(line,get){
            const f=stack[stack.length-1];f.line=line;f.get=get;if(!debug)return;
            const reason=native("tick",f.file,line,stack.length);
            if(reason)native("stopped",reason,frames());
        }
    };
    function load(name,from){
        const bits=(from&&name.startsWith(".")?from.split("/").slice(0,-1):[]);for(const part of name.split("/")){
            if(part==="..")bits.pop();else if(part&&part!==".")bits.push(part);
        }
        let id=bits.join("/");
        if(!Object.hasOwn(files,id))id+=".js";
        if(!Object.hasOwn(files,id))throw Error("找不到脚本模块 "+name);
        if(cache[id])return cache[id].exports;
        const module={exports:{}};cache[id]=module;
        api.enter(id,"<模块>");
        try{
            Function("require","module","exports","__ttD",files[id]+"\n//# sourceURL="+id)(p=>load(p,id),module,module.exports,api);
        }catch(e){
            api.error(e);
            throw e;
        }finally{api.leave()}
        return module.exports;
    }
    if(debug)native("init",prefix,initial);
    try{load(entry)}catch(e){throw Error((e.__ttLocation||entry)+" "+e.message+"\n"+e.stack)}
}