Search code examples
unity-game-enginepdb-files

Unity 5 pdb file on build - Development Build turned off


I have this game in unity 5 and when I build it, it produces 2 new files that were not made in unity 4.

player_win_x64.pdb
player_win_x64_s.pdb

What do these files do that are created by unity.

The only reference I can find to pdb is here at Debugging.


Solution

  • PDB files are generated for debugging purposes as you figured out. They will be generated if you select "Development Build" in build settings. Then you would use them as the documentation (http://docs.unity3d.com/Manual/windowsstore-debugging.html) tells under the title "Resolving callstack from UnityPlayer.dll".

    Keep in mind that this is an advanced topic and it won't be required to worry that much for Unity projects IMHO. Debugging approaches would ve different between realtime applications (like games) and event based applications (like most desktop applications). You may want to search for Unity specific and game development specific debugging methods if you are going to dive into this topic.

    Here is detailed information about PDB files and their importance if you like to take a look. But as I said, don't worry about them that much since this is a really advanced and not so Unity-development-friendly topic.

    https://msdn.microsoft.com/en-us/library/ms241903%28v=vs.90%29.aspx

    http://www.wintellect.com/devcenter/jrobbins/pdb-files-what-every-developer-must-know

    This is the data kept in PDB files (quoted from the page above)

    A native C++ PDB file contains quite a bit of information:

    Public, private, and static function addresses
    Global variable names and addresses
    Parameter and local variable names and offsets where to find them on the stack
    Type data consisting of class, structure, and data definitions
    Frame Pointer Omission (FPO) data, which is the key to native stack walking on x86
    Source file names and their lines
    

    A .NET PDB only contains two pieces of information, the source file names and their lines and the local variable names. All the other information is already in the .NET metadata so there is no need to duplicate the same information in a PDB file.