Google chrome devtools Chrome Devtools控制台隐藏来自远程设备的所有消息

Google chrome devtools Chrome Devtools控制台隐藏来自远程设备的所有消息,google-chrome-devtools,ios-webkit-debug-proxy,Google Chrome Devtools,Ios Webkit Debug Proxy,我正在使用IOS webkit调试代理和remotedebug IOS webkit适配器从Linux上的Chrome Devtools调试运行Safari的IOS iPad 它可以连接,我可以查看DOM等,但是console.log()消息不会显示在控制台中。我可以看到隐藏邮件数量增加,但我找不到查看邮件的方法 它最初是工作的,但已经停止。我曾尝试通过“设置->首选项->开发工具->恢复默认值并重新加载”将开发工具重置为默认值,但没有成功 请参见屏幕截图: 如果有任何帮助,我们将不胜感激。您

我正在使用IOS webkit调试代理和remotedebug IOS webkit适配器从Linux上的Chrome Devtools调试运行Safari的IOS iPad

它可以连接,我可以查看DOM等,但是console.log()消息不会显示在控制台中。我可以看到隐藏邮件数量增加,但我找不到查看邮件的方法

它最初是工作的,但已经停止。我曾尝试通过“设置->首选项->开发工具->恢复默认值并重新加载”将开发工具重置为默认值,但没有成功

请参见屏幕截图:


如果有任何帮助,我们将不胜感激。

您可以使用console.error而不是console.log。

我可以通过在文件
ios.ts

更新的代码

let message = msg.params.message;
    let type;
    let method = "Runtime.consoleAPICalled";
    if(message.type === "log") {
        switch(message.level) {
                case "log": type = "log"; break;
                case "info": type = "info"; break;
                case "error": type = "error"; break;
                default: type = "log";
        }
    } else {
        type = message.type;
    }

    const consoleMessage = {
        source: message.source,
        level: type,
        text: message.text,
        lineNumber: message.line,
        timestamp: (new Date).getTime(),
        url: message.url,
        stackTrace: message.stackTrace ? {
            callFrames: message.stackTrace
        } : undefined,
        args:message.parameters,
        networkRequestId: message.networkRequestId,
    };
    if(type == "error"){
        method = "Log.entryAdded"; 
        this._target.fireEventToTools(method, {entry:consoleMessage});
    }else
        this._target.fireEventToTools(method, consoleMessage);
    
    return Promise.resolve(null);
}

我有完全相同的问题,但在Windows上。它显示了有多少是隐藏的,以及侧边栏中的源代码,但我可以做任何我想做的事情。隐藏的消息不会出现。最有趣的是,错误会计入隐藏项,但每个错误都会显示一个2像素高的红色横幅,就像显示错误一样,但没有任何文本和2像素的高度。我也撞到了这面墙,在Chromium错误跟踪器上找不到任何错误报告,所以我不确定这是设计还是错误。我提出的唯一解决方案是用一个自定义方法替换console.debug()调用,该方法将消息存储在observable中,并将它们显示在可以在应用程序中最小化的DIV中。由于此解决方案没有帮助,请参阅@schl3ck对OP的评论。此解决方案实际上解决了问题。如果他也提到文件的位置会更好。