Create a gist now

Instantly share code, notes, and snippets.

@jbevain /README.md
Last active Jun 12, 2018

Embed
What would you like to do?
pdb2mdb for Visual Studio 2015

The Visual Studio Tools for Unity are able to convert .NET debug symbol files (namely pdb files) to debug symbols files that are understood by Unity's scripting engine (namely .dll.mdb files) when importing both the .dll and the .pdb in the Assets folder.

If you prefer to handle the conversion yourself you need to call a tool named pdb2mdb on the .dll associated with the .pdb:

pdb2mdb MyLibrary.dll

Will produce a MyLibrary.dll.mdb usable on Unity if MyLibrary.pdb is present.

The .pdb files generated by Visual Studio 2015 can contain new informations that are not handled by the pdb2mdb file shipped by Unity.

You can download below the version that VSTU is using which handles the new 2015 format. This executable is self-contained and embeds all the references it needs, namely Mono.Cecil.

License Information:

  • pdb2mdb is licensed under the Microsoft Public License (Ms-PL).
  • Mono.Cecil is licensed under the MIT/X11.
@xgalaxy

This comment has been minimized.

Show comment
Hide comment
@xgalaxy

xgalaxy Nov 13, 2015

Thank you!

xgalaxy commented Nov 13, 2015

Thank you!

@Tichau

This comment has been minimized.

Show comment
Hide comment
@Tichau

Tichau Nov 24, 2015

Thanks !

Tichau commented Nov 24, 2015

Thanks !

@bbi-yggy

This comment has been minimized.

Show comment
Hide comment
@bbi-yggy

bbi-yggy Jan 12, 2016

Thanks @jbevain, is this the latest and greatest pdb2mdb.exe? Is there a more "official" place to get it from? Should we use the one that comes with Unity? (Unity 5.2.3 includes it, I believe it may have been omitted from some of the earlier 5.x releases.)

Thanks @jbevain, is this the latest and greatest pdb2mdb.exe? Is there a more "official" place to get it from? Should we use the one that comes with Unity? (Unity 5.2.3 includes it, I believe it may have been omitted from some of the earlier 5.x releases.)

@azaz569

This comment has been minimized.

Show comment
Hide comment
@azaz569

azaz569 Mar 7, 2016

let me see see

azaz569 commented Mar 7, 2016

let me see see

@svermeulen

This comment has been minimized.

Show comment
Hide comment
@svermeulen

svermeulen Apr 9, 2016

@yoyobbi I've tested this with Unity 5.3.4f1 and found that it works as expected (ie. stack traces contain extra debug info). This was after I failed to get any of the versions of pdb2mdb.exe that come with that version of Unity to work

@yoyobbi I've tested this with Unity 5.3.4f1 and found that it works as expected (ie. stack traces contain extra debug info). This was after I failed to get any of the versions of pdb2mdb.exe that come with that version of Unity to work

@bbi-yggy

This comment has been minimized.

Show comment
Hide comment
@bbi-yggy

bbi-yggy May 11, 2016

I've confirmed that this works with Unity 5.2.3f1, with both Visual Studio 2015 and 2013. It would be nice if this could be distributed directly with Visual Studio Tools For Unity.

We will continue to do the PDB conversion explicitly because the automatic conversion when DLL's are imported into Unity did not work reliably for us. We have dozens of DLL's in our project, and only about half of them had their PDB files converted. Selecting both the DLL and it's PDB and reimporting explicitly did generate the MDB, but we cannot rely on this manual process.

I've confirmed that this works with Unity 5.2.3f1, with both Visual Studio 2015 and 2013. It would be nice if this could be distributed directly with Visual Studio Tools For Unity.

We will continue to do the PDB conversion explicitly because the automatic conversion when DLL's are imported into Unity did not work reliably for us. We have dozens of DLL's in our project, and only about half of them had their PDB files converted. Selecting both the DLL and it's PDB and reimporting explicitly did generate the MDB, but we cannot rely on this manual process.

@mikaelhogstrom

This comment has been minimized.

Show comment
Hide comment
@mikaelhogstrom

mikaelhogstrom Nov 30, 2016

Just tested it no unity 5.4 and it works. Strange that it is not included in the standard tools. Took me quite some time to figure out that it was the upgrade from VS2013 to VS2015 that had caused the mdb files to stop generating correctly... At least a warning message if you are on the worng version would be nice.

Just tested it no unity 5.4 and it works. Strange that it is not included in the standard tools. Took me quite some time to figure out that it was the upgrade from VS2013 to VS2015 that had caused the mdb files to stop generating correctly... At least a warning message if you are on the worng version would be nice.

@TMPxyz

This comment has been minimized.

Show comment
Hide comment
@TMPxyz

TMPxyz Jan 11, 2017

Thanks for the great tool. Works fine on Unity5.5.0f3.

TMPxyz commented Jan 11, 2017

Thanks for the great tool. Works fine on Unity5.5.0f3.

@shravan2x

This comment has been minimized.

Show comment
Hide comment
@shravan2x

shravan2x May 24, 2017

Still works in May 2017 with VS2017 and Mono 5.0.

@jbevain I'm making a quick-n-easy GUI tool for this. Would you be able to update the official pdb2mdb NuGet package?

EDIT: The GUI tool lives at https://github.com/shravan2x/Pdb2Mdb-GUI.

shravan2x commented May 24, 2017

Still works in May 2017 with VS2017 and Mono 5.0.

@jbevain I'm making a quick-n-easy GUI tool for this. Would you be able to update the official pdb2mdb NuGet package?

EDIT: The GUI tool lives at https://github.com/shravan2x/Pdb2Mdb-GUI.

@reyou

This comment has been minimized.

Show comment
Hide comment
@reyou

reyou May 28, 2017

For some reason, after re-installing of VS 2017, my pdb2mdb.exe disappeared from C:\ drive. My build was failing. This tool fixed my issue. Thanks!

reyou commented May 28, 2017

For some reason, after re-installing of VS 2017, my pdb2mdb.exe disappeared from C:\ drive. My build was failing. This tool fixed my issue. Thanks!

@dseshadri

This comment has been minimized.

Show comment
Hide comment
@dseshadri

dseshadri Jun 12, 2018

Could you help me point to the source code from where this version of PDB2MDB was built? I am trying to build the latest version from the mono repository, but i am facing a problem with my version. However, this Executable works great. So, i just need the same version from where this was built.

Could you help me point to the source code from where this version of PDB2MDB was built? I am trying to build the latest version from the mono repository, but i am facing a problem with my version. However, this Executable works great. So, i just need the same version from where this was built.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment