Debugging your Unity3d Windows Phone Game with UnityPlayer.log

unity
lumia

One of the most common questions we get from Unity developers is..

How can I debug my game?

I have done some previous post on debugging techniques see https://blogs.msdn.com/b/uk_faculty_connection/archive/2014/09/01/debugging-crashes-of-your-apps-and-games-on-windows-phone-8.aspx

However when debugging a game built with Unity, you may need to access the UnityPlayer.log file to see what’s happening on an actual device.

Here are some step by step instructions to how to get the log file off of Windows Phone physical devices for inspection.

What will you need

A PC running Windows 8.1 64bit Professional edition with the Windows Phone 8/8.1 SDK installed

A Windows Phone device

Your game as a .xap or .appx side loaded on the game from either Visual Studio or the Windows Phone Application Deployment tool.

How to access the UnityPlayer.log file on Windows Phone

Note: this method does not work on games installed from the Windows Phone store the game has to be side loaded onto your developer enabled phone.

Step 1. Find the GUID for your app or Game

For Windows Phone 8.1, this value is located in the Package.appxmanifest in Visual Studio. You will have to open the file using the text or XML editor. From there, you will need to find the PhoneProductID element of the PhoneIdentity tag.

For Windows Phone 8.0, this value is the Product ID, located in the WMAppManifest.xml file.

Under the packaging Tab

The Product ID: is listed as Number and letters in { }

Step2. Taking a snapshot of IsolatedStorage

Using the IsolatedStorageExplorerTool to capture a snapshot of the game’s Temp directory on the phone and copy it to a directory on your PC.

Open a Windows command prompt and enter the following command –

Windows Phone 8.1

 C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Tools\IsolatedStorageExplorerTool> ISEtool ts de appxfolder:Temp <your app’s GUID> "<PC target directory here>" 

Windows Phone 8.0

 C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Tools\IsolatedStorageExplorerTool> ISEtool ts de appxfolder:Temp <your app’s GUID> "<PC target directory here>" 

If the operation completed successfully, the tool will print “Done.” In the output window.

Now you can navigate to your output folder UnityPlayer.log file should be located in the newly created IsolatedStore directory.

References

https://docs.unity3d.com/Manual/wp8-debugging.html

https://wptools.codeplex.com/