How to debug MMO sample library

Options
In the Photon MMO sample how would I go about debugging Photon.MmoDemo.Client.Unity3D project?

Its only referenced as .dll by the UnityIsland's scripts. I tried attaching it to both Unity process and output game executable file, but I keep getting "symbols not loaded" thing in VS.

Comments

  • dreamora
    Options
    You can't debug it unless you have the symbols / built it accordingly.

    In general you can't use VS to debug anything in Unity.
    You need to fire up mono develop that comes with Unity and connect that debugger, as unity does not use MS .NET, in no case
  • Tobias
    Options
    Debugging in Unity requires the symbol files produced by Mono's compiler or the source.
    We usually compile in Visual Studio but in case of the MMO Demo, you got the source, too.

    So, open the solution in MonoDevelop and compile it there. You will need to run MD to debug with Unity anyways. Make sure your assemblies and their debug files end up in the assets and then follow the standard debug procedures for Unity to debug the mmo demo code.
  • it doesnt work :(

    I build the lib project with MD into Assets folder from where its used by the level. Attach it to Unity process, when I place breakpoints however they are pink (I guess it means symbols aren't loaded?), and when debugging they are not hit.
  • dreamora
    Options
    you need to move the debug symbols along the dll when you compile the assembly in MD.
  • dreamora wrote:
    you need to move the debug symbols along the dll when you compile the assembly in MD.

    could explain in more detail please? I have the library compiled into my UnityWorld/Assets/Photon/libs It has both dll's and pdb's there (and that still dont work). Is that what you mean?
  • Tobias
    Options
    The pdb won't help in Unity. You need the mdb files that Mono compiles.
    This should help: http://answers.unity3d.com/questions/37 ... -dlls.html
  • thanks I will try that tonight when I get home. Seems people are having trouble debugging .net dlls there though?

    Also another quick question.. I seem to have my MD crash when I have to instances open (one with unity scripts & another will the dll project) and try to attach both of them to a single Unity process. Is that even possible? Or I can only debug one project at a time?
  • dreamora
    Options
    Thats indeed not possible.
    You can only attach one debugger so you need to decide which one you want to attach.

    Also you don't need both open, the one with the unity project should enough when the mdb are there.

    Alternatively you can drop the sources of the dll into the project itself and remove the dll during development and switch it at the end again before doing a deploy for example, then you don't even need the mdb
  • dreamora wrote:
    Alternatively you can drop the sources of the dll into the project itself and remove the dll during development and switch it at the end again before doing a deploy for example, then you don't even need the mdb

    Thats what I did, thanks. Now I can debug it all no prob muahah