Open Tizen Remote Web Inspector from command line

Viewed 2409

I'm about to take over maintaining a Tizen 2017 js application, and am new to the platform. As far as I know, the application has been developed outside of the official Tizen IDE by taking the skeleton of a basic project, and doing the rest with normal web development toolchains. As such, the application can be installed and opened using the tizen CLI command, but it doesn't seem to be possible to install and inspect using the IDE (eg. "Run as" / "Debug as" fail) for whatever reason.

Is it possible to launch the Remote web inspector from the command line?

2 Answers

It took forever to figure this out but you can tell the TV to open a debugging port and then use sdb forward it to your local machine without the Tizen Studio IDE.

Assuming sdb is connected to the TV you can use the following

sdb shell 0 debug SomePackage.Identifier

then take the port returned there and forward it

sdb forward tcp:45087 tcp:45087

From there you can find your inspectable application at chrome://inspect/devices#devices

Chrome Dev Tools

Prerequisites

  • Chrome browser
  • Samsung Development Bridge
  • Command Line Tool

Actions:

  1. Open Command Line Tool (Terminal/Command Prompt/Power Shell/Git Bash/ whatever you like)
  2. sdb connect 192.168.0.123 // Samsung TV IP Address
  3. sdb devices and check that your device is present
  4. Close the Telenor Stream app on your Samsung device by long pressing the back button on your samsung remote.
  5. Open the app from command line sdb shell 0 debug SomePackage.Identifier should give this answer ... successfully launched pid = 15900 with debug 1 port: 37846
  6. Use port from answer sdb forward tcp:37846 tcp:37846
  7. In Open Chrome and paste chrome://inspect/#devices in address bar
  8. Check Discover network targets click Configre and add localhost:37846
  9. Be sure that app is open on your Samsung and it will show up as a Remote Target
  10. When redeploying app repeat step 3 - 7

Chii Debugger

Prerequisites

Actions

  1. Open Command Line Tool (Terminal/Command Prompt/Power Shell/Git Bash)
  2. Start Chii with command chii start -p 8080
  3. Add <script src="http://{your-computers-local-ip-address}:8080/target.js"></script> to index.html
  4. Deploy app to Samsung TV and start the app
  5. Open browser and paste http://localhost:8080/ in address bar
  6. Click Inspect

Be sure that you have your Chii server runnig if script tag is present in index.html.

Comment/Remove Chii script if you don't use the chii debugger.

Related