microsoft / gdk-unity-package

The Unity package for PC GDK developers.
Other
48 stars 18 forks source link

Generating debuging symbols for submission #58

Open lassade opened 2 years ago

lassade commented 2 years ago

Hi,

How do I generate debuging symbols for submission?

payzer commented 2 years ago

I believe I know the answer, but let me double check and reply back to make sure I give you the most correct answer.

payzer commented 2 years ago

MakePkg, which is called under the covers when creating a package for the store will bundle the files into a symbols zip automatically. Although, there are warning about it not being able to find the symbols in the subval logs.

We'll investigate this and see if we can fix that in the plugin. In the meantime, you could run MakePkg directly on the Win32 folder generated by the build and run, using the /symbolpaths argument to help it find symbols: https://docs.microsoft.com/en-us/gaming/gdk/_content/gc/packaging/deployment/makepkg

lassade commented 2 years ago

Thanks! I will give a look into it

lassade commented 2 years ago

The symbols are been generated, once in a while (and I don't know why) they don't get generated. But it will stil mostly wrong (many warnings in the validator) to fix this I had to add this step before packing

bool DefineNTSymbolsPath()
        {
            try
            {
// NOTE: ASSUMES THE "BackUpThisFolder" WAS MOVED FROM THE Win32 DIRECTORY !!!!
                var backupFolderPath = $"{Application.productName}_BackUpThisFolder_ButDontShipItWithYourGame";
                var editorPath = Directory.GetParent(EditorApplication.applicationPath);
                var value =
                    @$"{editorPath}\Data\PlaybackEngines\windowsstandalonesupport\Variations\win64_development_il2cpp;" +
                    @$"{editorPath}\Data\PlaybackEngines\windowsstandalonesupport\Variations\win64_development_mono;" +
                    @$"{editorPath}\Data\PlaybackEngines\windowsstandalonesupport\Variations\win64_nondevelopment_il2cpp;" +
                    @$"{editorPath}\Data\PlaybackEngines\windowsstandalonesupport\Variations\win64_nondevelopment_mono;" +
                    @$"{buildOutputFolderPath}\{backupFolderPath}\Managed;" +
                    @$"{buildOutputFolderPath}\{backupFolderPath}";

                Environment.SetEnvironmentVariable("_NT_SYMBOL_PATH", value);
                return true;
            }
            catch (Exception e)
            {
                UnityEngine.Debug.LogException(e);
                return false;
            }
        }
payzer commented 2 years ago

Interesting. Thank you for sharing this.

MonsterArtur1 commented 2 years ago

But still, I'm missing pdb for dlls provided by gdk plugin (Microsoft_Xbox_Services_141_GDK_C_Thunks.dll and XGamingRuntimeThunks.dll) Can we get these pdbs?

payzer commented 2 years ago

Thank you for the question.

We've got some of the pdbs here:<GDK install folder, likely C:>\Program Files (x86)\Microsoft GDK\\GRDK\ExtensionLibraries\Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release

I'll open a tracking item on our side to look into, getting the PBDs for the thunks,