Deploying on Xbox devices

Developing Xbox applications can be divided in two parts: 1- Serving or packaging your JS Dana project with an Xbox profile 2- Building and Deploying your app on Xbox

Serve

Considering you have set up your Xbox environment with a correct xbox profile, then run the following command (this can be done on a separate linux machine, accessible by the network):

grunt serve --profile=my-xbox-profie

As for other profiles, your app is now served on port 9000 by default.

If not exists already, an app_xbox folder must be created in your project root folder.

Build

  1. With Visual Studio, open the app_xbox project with Visual Studio
  2. Build the project by clicking on Build > Build solution

The dependency wtv-chakra-xbox must be downloaded and added to your project References Xbox references

The build must succeed before going to the next steps.

Run

To run your app, you have multiple options:

  • Run locally on a Windows system or remotely on an Xbox
  • Debug the app or install it (Debug to see logs or install it ot be able to launch the app afterward)
  • Launch it in Debug mode or Release mode (More logs may appear in debug mode while release mode is more efficient)

To run your app (locally or on an external device), you can follow the steps here: Starting a C# project.

In addition, you need to set the Command line arguments with your grunt server address: http://<your_ip>:9000.

Debug

How to see JS changes ?

In case you make an update on your Dana JS codebase, simply restart or reinstall the app on your device using Visual Studio. (You don’t need to start grunt nor build your app again).

How to see JS logs ?

In Debug mode, you can see your JS logs in the “Output” section.

Xbox debug output

How to see rendered components tree ?

You can use Visual Studio “Live Visual Tree” tools while in debug mode. Native components tree and their properties will be displayed and can be edited in live.

Xbox live visual tree

Xbox device portal

While in dev mode, an Xbox device provides a “Remote device portal” accessible in a web browser providing several tools such as managing your apps, monitoring http requests or system performance.

More information here: Xbox device portal