我也想要此功能,可以用来优化小程序
小程序调试器里的Wxml代码怎么复制?小程序调试器里的Wxml代码怎么复制
2021-03-08我也遇到了同样的问题,真机调试。使用FSM.readFileSync读微信好友里的pdf文件出错。 Unhandled promise rejection Error: readFileSync:fail timeout at l (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:1964570) at Object.A.<computed> (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:1855963) at Object.l.<computed> [as readFileSync] (eval at n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:1939342) 我用的是iphone 6s plus。求解决办法。文件就2M而已。
FileSystemManager 读取大文件超时?小程序真机调试时,下载大约5MB的文件后,读取超时。试过两种方法: 方法一:FileSystemManager.readFile(Object object) var wasmfilepath = evt.tempFilePath; console.log(wasmfilepath) console.log(wasmdir + wasmfilename) var ret = FSM.saveFileSync(wasmfilepath, wasmdir + wasmfilename); console.log(ret) var stat = FSM.statSync(ret, false) console.log(stat) FSM.readFile({filePath: ret, success(res) { console.log("read file suceed!!!") new WebAssembly.compile(wasmdata).then(function (wam) { new WebAssembly.instantiate(wam, info).then(receiveInstantiatedSource); }); }, fail: console.error }); 方法二:FileSystemManager.readFile(Object object) var wasmfilepath = evt.tempFilePath; console.log(wasmfilepath) console.log(wasmdir + wasmfilename) var ret = FSM.saveFileSync(wasmfilepath, wasmdir + wasmfilename); console.log(ret) var stat = FSM.statSync(ret, false) console.log(stat) var res = FSM.readFileSync(ret) new WebAssembly.compile(res).then(function (wam) { new WebAssembly.instantiate(wam, info).then(receiveInstantiatedSource); });[图片] 模拟器调试同样的代码,没有问题。
2021-01-07