Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How do I get xcode to output line numbers or a stack overflow

Discussion in 'iOS and tvOS' started by avatara359, Feb 8, 2011.

  1. avatara359

    avatara359

    Joined:
    May 12, 2010
    Posts:
    41
    I occasionally have problems like a “EXC_BAD_ACCESS” and it takes terribly long to debug. Is there anyway to make xCode output a file/line number of the exception or a stack overflow with more useful information?


    Program received signal: “EXC_BAD_ACCESS”.
    warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).
    kill
     
  2. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @avatara359, when developing a straight up iOS app that you have all the source code for it is way easier to get the details of where the error occurred. With Unity, you have a whole pile of library code that you don't have the source for along with all your scripts that get compiled into something completely different than they were in the Unity editor so you don't get the convenience of file and line numbers. Your best bet is to dump a stack trace and hope for the best. Just type "thread apply all bt" in the GDB console to get the trace.
     
  3. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Line numbers currently are not available, but you can get class / method name from. There is dedicated section for that in Unity manual iOS troubleshooting section : http://unity3d.com/support/documentation/Manual/TroubleShooting.html#iPhoneTroubleShooting