Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
4
Question by kkirkfield · Aug 02, 2015 at 08:57 PM · plugindebug

pdb2mdb.exe not working on Visual Studio 2015

I'm trying to setup DLL debuging for DLLs compiled in Visual Studio 2015. The target is .Net 3.5 and DLLs can work in Unity 5.1.2f1. I've tried all of the following command lines to try and convert the pdb to mdb, but none of them are working.

 "C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\pdb2mdb.exe" DLLTest.dll
 "C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\4.5\pdb2mdb.exe" DLLTest.dll
 "C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\bin\cli.bat" "C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\4.5\pdb2mdb.exe" DLLTest.dll

Here is the error for each of them.

 Fatal error:
 Microsoft.Cci.Pdb.PdbDebugException: Unknown custom metadata item kind: 6
    at Microsoft.Cci.Pdb.PdbFunction.ReadCustomMetadata(BitAccess bits)
    at Microsoft.Cci.Pdb.PdbFunction..ctor(String module, ManProcSym proc, BitAcc
 ess bits)
    at Microsoft.Cci.Pdb.PdbFunction.LoadManagedFunctions(String module, BitAcces
 s bits, UInt32 limit, Boolean readStrings)
    at Microsoft.Cci.Pdb.PdbFile.LoadFuncsFromDbiModule(BitAccess bits, DbiModule
 Info info, IntHashTable names, ArrayList funcList, Boolean readStrings, MsfDirec
 tory dir, Dictionary`2 nameIndex, PdbReader reader)
    at Microsoft.Cci.Pdb.PdbFile.LoadFunctions(Stream read, BitAccess bits, Boole
 an readAllStrings)
    at Pdb2Mdb.Driver.Convert(AssemblyDefinition assembly, Stream pdb, MonoSymbol
 Writer mdb)

I also tried it after following the instructions at this link, but it doesn't seem to help. Are there any fixes for these errors, or is there another way to debug DLLs compiled in VS2015?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by yoyobbi · May 11, 2016 at 11:06 PM

Installation instructions for Visual Studio Tools For Unity are here. In theory VSTU should automatically convert PDB files to MDB format when the corresponding DLL is imported into Unity. However, you need to enable Visual Studio 2015 as your external script editor for this to work -- and even then I have found it to be inconsistent, and that it doesn't always do the conversion for all imported DLL's.

The workaround is to use this version of pdb2mdb.exe, provided by the author of Visual Studio Tools For Unity. It would be nice if Microsoft would provide this directly with VSTU, but at least it worked, or it did for me. Note that this updated version supports Visual Studio 2015 and is backwards-compatible with 2013.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Mikael-H · Nov 30, 2016 at 09:45 AM 0
Share

Thanks, this worked! I wish there was a warning that pdb2mdb does not work with visual studio 2015... Or maybe they could update it when you install visual studio 2015 tool for unity

avatar image Mikael-H Mikael-H · Feb 13, 2017 at 01:09 PM 0
Share

I came back to this issue a few months later after updating to Unity 5.5 and Visual Studio 2017RC at work. Your solution still works. Funny thing is, I had entirely forgot about ever having this issue but found your answer with my own comment under it, tried it and it worked :D As I couldn't upvote you again as you deserved I awarded you some points ins$$anonymous$$d :) Thanks for saving me hours of frustration, again!

avatar image yoyobbi Mikael-H · Feb 14, 2017 at 06:23 PM 1
Share

Glad to hear the info was useful. :)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

25 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to enable DX debug layer D3D11_CREATE_DEVICE_DEBUG? 3 Answers

How would I debug a Unity-plugin from XCode? 3 Answers

Debug unity plugin 0 Answers

Can I see debug log(ex:printf) from C++ dll in Unity? 0 Answers

Google play authentication failed after adding keystore 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges