Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug a Kiosk Chrome application running on a Chromebox?

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?

like image 265
Bob Groeneveld Avatar asked Dec 12 '14 13:12

Bob Groeneveld


People also ask

What is kiosk mode Chromebox?

Setting a kiosk app to launch automatically turns devices running Chrome OS into single-purpose devices. You can deploy multiple kiosk apps to devices, but you can only configure one app to automatically launch when devices start.


1 Answers

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 or pkill 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.

like image 158
Reilly Grant Avatar answered Sep 28 '22 03:09

Reilly Grant