如何调试Chromebox上运行的Kiosk Chrome应用程序? [英] How to debug a Kiosk Chrome application running on a Chromebox?

本文介绍了如何调试Chromebox上运行的Kiosk Chrome应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写的Chrome Kiosk应用程序只有在Chromebox上以Kiosk模式运行时才会出现问题。在登录Chromebox后手动启动应用程序时,它运行良好。另外在我的开发机器上测试应用程序时,一切正常。



如何附加远程调试会话,写入远程日志记录信息或以任何其他方式从Chromebox上的Kiosk应用程序获取调试信息到我的开发机器?如果您使用--remote-debugging-port = 9222选项运行Chrome,它将提供对<$ c $的DevTools的访问权限C> HTTP://本地主机:9222 / 。现在,在Kiosk模式下运行的Chromebox不是一切有用的(甚至是可能的),而无需额外的步骤:


  1. 将设备置于开发者模式。说明取决于硬件模型

  2. 制作文件系统可写,以便您可以修改chrome的命令行参数。

  3. 将< - c $ c>添加为--remote-debugging-port = 9222/ etc / chrome_dev.conf 。

  4. killall chrome ,以便命令行更改生效。

  5. 使用ssh登录到Chromebox并在本地转发端口: ssh -L9222:127.0.0.1:9222 chronos @< chromebox ip>

  6. 在本地机器上访问DevTools,位于 http:// localhost:9222 /

考虑到以上所有情况,如果您可以以非信息亭模式运行它,则更容易调试自助服务终端应用。


A Chrome Kiosk application that I wrote has a problem only when running in Kiosk mode on a Chromebox. When staring the application manually after I log into the Chromebox it runs well. Also when testing the application on my development machine everything works well.

How can I attach a remote debug session, write remote logging information or in any other way get debugging information from the Kiosk application on the Chromebox to my development machine?

解决方案

If you run Chrome with the --remote-debugging-port=9222 option it will provide access to DevTools at http://localhost:9222/. Now, on a Chromebox running in Kiosk mode that's not all that useful (or even possible) without some extra steps:

  1. Put your device in "developer mode". Instructions vary depending on hardware model.
  2. Make the file system writable so that you can modify chrome's command line arguments.
  3. Add "--remote-debugging-port=9222" to /etc/chrome_dev.conf.
  4. killall chrome so that the command line changes take effect.
  5. Use ssh to log into the Chromebox and forward the port locally: ssh -L9222:127.0.0.1:9222 chronos@<chromebox ip>
  6. Access DevTools from your local machine at http://localhost:9222/

Given all this it is easier to debug a kiosk app if you can run it unpackaged in non-kiosk mode.

这篇关于如何调试Chromebox上运行的Kiosk Chrome应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆