在chrome os调试日志中获取chrome app控制台日志

时间:2018-01-03 10:06:08

标签: google-chrome-extension google-chrome-app google-chrome-os

我有一个带有几个隔离层(网页浏览量,iframe)的Chrome应用程序,所有这些层都使用console.log()将一些调试内容记录到控制台。

在使用--enable-logging --v=1标志的mac os上启动chrome时,我设法将所有控制台日志放在chrome调试日志中。

问题是我在chrome os中运行应用程序时无法获取所有console.logs。对于chrome os调试,我将以下内容写入/etc/chrome_dev.conf文件:

CHROME_LOG_FILE=/tmp/chrome_debug.log
--enable-logging --v=1

所以我希望在mac os上运行chrome app时会得到几乎相同的日志,但我在/tmp/chrome_debug.log中看不到任何console.logs。

非常感谢如何在chrome os

上的chrome调试日志中获取我的app console.logs

1 个答案:

答案 0 :(得分:0)

请阅读/etc/chrome_dev.conf文件中的评论,特别是顶部的评论:

# This file may be modified to make local changes to the environment and command
# line that session_manager uses to run Chrome. It contains one directive per
# line, with the following forms available:

这意味着您的--enable-logging --v=1不正确,因为您在一行上放了两个选项,而不是每行一个选项。

相关问题