Search Issue Tracker

Third Party Issue

Votes

0

Found in

6000.1.0b10

Issue ID

UUM-101583

Regression

Yes

[UWP] Cannot run C# Unity Debugger on UWP Xbox Apps

-

Steps to reproduce:

  1.  Create a Blank Project targeting UWP
  2.  Follow the steps available here to correctly configure your project for C# Debugging : 

## Go to File > {}Build Profiles{}. In the Platform Settings section, enable {}Script Debugging{}.
## In Player settings, enable the {}InternetClient{}, {}InternetClientServer{}, and PrivateNetworkClientServer capabilities.

  1.  Build your project and open the generation Visual Studio Application
  2. In VS Project Properties , open Debugging and change to your Remote Xbox Target
  3. Build the VS Project and observe the project open on Xbox
  4. In VS, Debug > Attach Unity Debugger
  5. Observe the Xbox running the application is not available in the list of Remote targets. You also cannot connect directly via IP

Actual results: 
You are unable to connect to the Xbox running the UWP Unity Application with the Unity Debugger.

Expected results: 
The Xbox IP becomes available to connect the Unity Debugger , and the user can also connect directly.

Reproducible with versions: 6000.1.0b10

Tested on (OS): 
Built using Windows Editor for UWP - deployed on Xbox Series X.

  1. Resolution Note:

    After investigating this issue extensively, we have decided to close this issue as a "Third Party Issue" with the following findings.

    UWP Unity apps are unable to be remotely debugged using the Unity Debugger (nor profiled with the Unity Profiler) on an Xbox due to firewall restrictions blocking the required incoming TCP ports.

    Both the Unity Debugger and Profiler function by communicating via a TCP connection using a runtime varying port ranging between 56000 and 56999.

    Users are able to discover the UWP Unity app running on an Xbox as the firewall permits outgoing TCP communication, but when a user attempts to connect to the running player it will silently fail due to no response from the connection initiation/handshake step.

    This is not typically an issue when developing a regular GDK based application for Xbox, as the ability to add "DebugNetworkPorts" to the MicrosoftGame.config file exists, which opens the firewall for development purposes. More information on this can be found on the Microsoft Game Development Kit Documentation under Xbox console port behavior. (https://learn.microsoft.com/en-us/gaming/gdk/docs/features/console/networking/game-mesh/xbox-console-port-behavior)

    This is also not typically an issue when developing a UWP Unity app that is expected to run on a remote Windows machine, as the firewalls on both the developer and target machines can be manually configured by the end user (developer) to enable debugging. Running the UWP Unity app on the local machine does not typically require opening firewall ports, as most machines allow for sending and receiving TCP communication to and from the same machine. This all assumes the InternetClient, InternetClientServer, and PrivateNetworkClientServer capabilities have been set in the UWP Package.appxmanifest file. (https://docs.unity3d.com/Manual/uwp-debug-c-sharp.html)

    Unless Microsoft make it possible to open a specific TCP port for debugging in a manifest file for a C# UWP application which the Xbox is able to read, there isn't anything further we can do from our end. GDK (NDA) developers are not affected by this issue as there is a mechanism to workaround the Xbox firewall.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.