Search Unity

Help - How to debug an iOS app over windows using Visual Studio and Cloud Build

Discussion in 'iOS and tvOS' started by cfortnerLL, May 19, 2019.

  1. cfortnerLL

    cfortnerLL

    Joined:
    Apr 25, 2019
    Posts:
    2
    Hi, I am having trouble setting up the debugging pipleline in Visual Studio to debug my iOS app. After reading around, it seems it should work... but I havent been succesfull so far...

    I built my iOS app over the Unity Team Cloud Build, which results in a .ipa file that I download.
    Then I install the .ipa file onto my iPhone over iTunes (in Windows) - then I start the app.

    After I start the app on my iPhone, in Visual Studio I select "Debug -> Attack Unity Debugger" and can see my iPhone, which is listed under "iPhonePlayer", then I select that.

    After I connect I get the following output log:

    Loaded: Module: mscorlib.dll
    Loaded: Module: Mono.Security.dll
    Loaded: Module: System.Configuration.dll
    Loaded: Module: System.dll
    Loaded: Module: System.Xml.dll
    Loaded: Module: System.Core.dll
    Loaded: Module: UnityEngine.SharedInternalsModule.dll
    Loaded: Module: UnityEngine.CoreModule.dll
    Loaded: Module: UnityEngine.TextRenderingModule.dll
    Loaded: Module: System.Diagnostics.StackTrace.dll
    Loaded: Module: System.Globalization.Extensions.dll
    Loaded: Module: UnityEngine.AnimationModule.dll
    Loaded: Module: UnityEngine.AudioModule.dll
    Loaded: Module: UnityEngine.GameCenterModule.dll
    Loaded: Module: UnityEngine.IMGUIModule.dll
    Loaded: Module: UnityEngine.Physics2DModule.dll
    Loaded: Module: UnityEngine.PhysicsModule.dll
    Loaded: Module: UnityEngine.UIModule.dll
    Loaded: Module: UnityEngine.UnityAnalyticsModule.dll
    Loaded: Module: UnityEngine.UnityWebRequestModule.dll
    Loaded: Module: UnityEngine.dll
    Loaded: Module: netstandard.dll
    Loaded: Module: UnityEngine.CloudBuild.dll
    Loaded: Module: UnityEngine.UI.dll
    Loaded: Module: Assembly-CSharp.dll
    The program 'Unity' has exited with code 1 (0x1).


    As you can see, it just exiteded.

    I thought maybe I am missing the symboles, aka .pdb files.
    So in Visual Studio, under Debug -> Options -> Debugging -> Symbols, I added every location from the project that contains a .pdb file, and also extracted the downloaded/installed .ipa file and selected the path to the .pdb file that was extracted - but to no success.

    Everytime I try to debug, my breakpoints display the missing symbole icon and/or the debugging attempt exits with the message I described above.

    As to my Cloud Build settings, under the config, I set the "Development Builds" to "Yes" and in my project build settings I selected "Debug", "Development Build" and "Script Debuggin" - alltho I doubt this makes any difference because the build is happending on Unity Team's Cloud Build, and my Visual Studio project is set to "Debug" as well.

    I tried to describe my pipeline, setup and configurations to the last detail.
    So anyone know how I can get this to work, or if it's even possible?

    Thanks.
     
  2. cfortnerLL

    cfortnerLL

    Joined:
    Apr 25, 2019
    Posts:
    2
    I just noticed somthing, so here is some more info: When I attach the debugger to the device and wait about 10-20 seconds, I can set breakpoints, and it seems to be hitting them because the device will pause/freeze on where the breakpoint is and if I stop debugging, the device continues - but in visual studio, it doesn't show where it hit it and doesn't act as if a breakpoint was hit...