Search Unity

Better managed dll debugging support

Discussion in 'General Discussion' started by Redtail87, Jan 18, 2019.

  1. Redtail87

    Redtail87

    Joined:
    Jul 17, 2013
    Posts:
    125
    Heya,

    I found a way to debug external managed dlls within unity without having to link it to the generated project solution. This makes it much easier for my setup, so I thought I would share in case it would help anyone else.

    Open up your managed dll csproj in a text editor, and add this property block:

    Code (CSharp):
    1.   <PropertyGroup>
    2.     <ProjectTypeGuids>{E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    3.     <UnityProjectGenerator>Unity/VSTU</UnityProjectGenerator>
    4.     <UnityProjectType>Game:1</UnityProjectType>
    5.     <UnityBuildTarget>StandaloneWindows64:19</UnityBuildTarget>
    6.     <UnityVersion>2018.3.1f1</UnityVersion>
    Change the UnityProjectType to
    Editor:5
    for editor projects.

    Attach to unity, and now all the debug points will hit for play, editor, and test.
    Works with 2018.3.1f1, hopefully it keeps working in the future.

    Cheers.
     
    MasterSubby, Dcloth and MNNoxMortem like this.