Search Unity

File and line numbers in stack trace

Discussion in 'Unity Cloud Diagnostics' started by colinday, Nov 15, 2015.

  1. colinday

    colinday

    Joined:
    Jan 9, 2012
    Posts:
    9
    It seems that line numbers are not reported with the managed stack trace in my release builds and sent to Unity Game Performance Reporting, but they do show up in the editor. Presumably this is because of a difference between development and release builds, or that my release builds doesn't have some extra symbol data to give line numbers.

    Is there a way I can configure anything or additional files I can include in my release builds to have line numbers reported with the exception callstacks received from an Application.logMessageReceived handler?

    Here is an example of a callstack reported by Unity Game Performance, the file/line would normally appear appear after the parameter list but is absent.

    AssemblyCSharp.SkillDecisions.fillActorListFromSource (.Actor actor, System.Collections.Generic.List`1 results, .Actor source)
    AssemblyCSharp.SkillDecisions.findTargetsWithinRadius (.Actor source, .Map map, Int32 radius, System.Collections.Generic.List`1 targets)
    AssemblyCSharp.SkillDecisions.Collect (.Actor owner, Int32 awarenessRadius, System.Collections.Generic.List`1 prioritySkills)
    AI.GenerateAction ()
    FollowerAI.GenerateAction ()
    Actor.doGenerateAction ()
    Follower.doGenerateAction ()
    Actor.GenerateAction (Int32 currentTurn)
    AssemblyCSharp.ActionManager.updateTurn ()
    AssemblyCSharp.ActionManager.Update ()
    Map.UpdateMap ()
    MapManager.Update ()
     
    Novack likes this.
  2. ChrisLundquist

    ChrisLundquist

    Unity Technologies

    Joined:
    Mar 2, 2015
    Posts:
    55
    You're exactly right, having line numbers here would be quite helpful.

    I also think you're right, that the reason is because the game is running in release mode and doesn't have debug symbols. Your example stack trace is all we get from the exception object.

    Sadly, there is no additional configuration to turn these on service wise. If there is a way to do it, you would have to do it in the editor / build configuration.

    Let me know if you have any thoughts or ideas!

    Chris Lundquist
     
  3. Roxley

    Roxley

    Joined:
    Aug 13, 2017
    Posts:
    1
    How can you than have lines numbers in release mode ?

    Android Google Play dosn't allow to upload apps in development mode.
     
  4. jiwana

    jiwana

    Joined:
    Oct 16, 2014
    Posts:
    1
    I am also hoping to see line numbers in stack traces for release builds. Is there a solution to this?
     
  5. MercurialKid

    MercurialKid

    Joined:
    Aug 30, 2018
    Posts:
    21
    "I am also hoping to see line numbers in stack traces for release builds"

    +1 this should be a standard feature

    Debug.Log - should be able to add Class name and Line number to run time logs: currently I'm having to type out a required amount of information by hand...!
     
  6. ookk47oo

    ookk47oo

    Joined:
    Mar 17, 2017
    Posts:
    26
    So it's 2019 now and this is still not supported?
     
  7. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,143
    Hey everyone. We have an upcoming Hack Week where the devs will be looking into seeing how line numbers can be grabbed from IL2CPP release builds. Pending how that prototype session goes will determine how soon, or if at all, we'll be able to get this feature in. Thank you, everyone, for your interest and we'll make sure to update you once we have any updates.
     
    Novack likes this.