Search Unity

No Line Numbers in CallStack for Development Builds

Discussion in 'Unity Cloud Diagnostics' started by alan-lawrance, Oct 22, 2019.

  1. cchute

    cchute

    Joined:
    Aug 10, 2014
    Posts:
    30
    Any updates on this issue? Getting all 0s for line numbers in Unity Dashboard. Having Unity plus doesn't give the line numbers does it?
     
    valentin56610 likes this.
  2. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @cchute, I'm sorry that you're not seeing line numbers. Is your build using Mono for its scripting backend and set in the build settings to be a development build? Which platform is your build targeting?
     
  3. cchute

    cchute

    Joined:
    Aug 10, 2014
    Posts:
    30
    @ryanc-unity I'm using Mono. It works fine when I set it to development build, but I was hoping to get the line numbers for the production builds that our players are playing. Is that not possible?

    Thanks for your insight

    -Carl
     
  4. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    I'm afraid that Cloud Diagnostics does not currently support displaying line numbers for release builds at this time. It's a feature that is on our roadmap.
     
  5. Wappenull

    Wappenull

    Joined:
    Oct 29, 2013
    Posts:
    51
    I want to add my finding to this thread. My case is different than OP's. But it is resolved to be something else. I think it would help some people who landed on this thread.

    Symptom:
    My steam build will not print line number.
    I'm building locally, with Steamworks.NET, Unity 2019.3.15
    devbuild=on,
    scriptdebugging=on (actually this is not relevant, Unity will generate pdb in Data/Managed anyway)
    scripting back end = Mono
    everything else off.

    Cause:
    Steam uploading will strip *.pdb by default.
    upload_2020-9-25_16-38-54.png
    In addition, it is appear to me that the standalone build will print line number IF and ONLY IF:
    pdb is present in Data/Managed, and dll pair it is associating has exactly matching DLL version. (built together)

    Solution:
    You need to generate VDF file from SteamPipe build uploader, edit it to include pdb. And run the upload manually.
     
    valentin56610 and Guedez like this.
  6. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    [EDITED to include a mention to the workaround]

    Unfortunately, we won't be able to resolve the originally reported issue on our end. The reason is that Steam strips out the PDBs during the upload process. This prevents Cloud Diagnostics from capturing any line number data from Steam builds. There unfortunately isn't much else that we can do on our end to work around this issue.

    However, @Wappenull's workaround above should work for most users.
     
    Last edited: Apr 14, 2021
  7. alan-lawrance

    alan-lawrance

    Joined:
    Feb 1, 2013
    Posts:
    360
    Ryanc -- did you read the previous post from Wappenull that explains why the pdbs are removed by default, and how they can be included?
     
    Xtro likes this.
  8. PS_SuperJura

    PS_SuperJura

    Joined:
    Apr 3, 2018
    Posts:
    7
    sorry for the necro, but any information about line numbers in release builds?
     
  9. valentin56610

    valentin56610

    Joined:
    Jan 22, 2019
    Posts:
    156
    Haha, having the same issue. I guess as long as you use Steam with your game you're screwed, how convenient that Steam is THE platform to sell your game at...
     
  10. PS_SuperJura

    PS_SuperJura

    Joined:
    Apr 3, 2018
    Posts:
    7
    I do believe you can achieve this by uploading pdb files with the game. You can modify vdf files so they upload pdbs also. I did not test this, but it could work.
    upload_2023-8-17_13-31-57.png

    But I do not want to send pdb files to players..
     
  11. Wappenull

    Wappenull

    Joined:
    Oct 29, 2013
    Posts:
    51
    Update and clarify my own answer. Note that this issue is specific to when uploading game to Steam and about upload script that matters.

    What is the problem?
    If you generated upload scripts from SteamPipeGUI, a tool provided with steam sdk to quickly upload build to steam pipeline, its script will have this line that exclude PDB by default.
    Why? I think it is mostly for C++ games, giving PDB to user makes wizkids reverse engineer your game easier, which is bad thing.

    Why include PDB? What's benefit?
    Now for Unity, why should I include those PDB?
    The only reason to include PDB to steam build is when you build game as development build. Because your game may be in early access and need to closely monitor errors (via cloud diagnostic etc) to pinpoint to exact line number,
    so you build the development build and serve to players. (Big game like Oxygen not included was also dev build in their early stage)

    Other than that, you dont need to. Especially when you build the "release build".

    Don't worry about someone will hack your game, Unity compiled game are already well studied and hacker will be able to do anything they want to do. There is another measure to; 'not prevent', but to make it a bit more troublesome to hack like obfuscator.

    How do I include PDB with steam upload?
    To include PDB with steam upload, edit the "depot_DEPOTID.vdf" file (e.g., generated from SteamPipeGUI) and comment out (//) the FileExclusion PDB line. Or removing entire line also works.

    upload_2023-9-13_18-28-15.png
     
  12. valentin56610

    valentin56610

    Joined:
    Jan 22, 2019
    Posts:
    156
    Thanks a lot for getting back and clearing some things out

    Unfortunately, none of my .VDF files simply contain any mention of excluded files... There is nothing to comment out...

    See for yourself:
    Capture d’écran 2023-09-14 à 14.29.58.jpg
     
  13. Wappenull

    Wappenull

    Joined:
    Oct 29, 2013
    Posts:
    51
    If your issue were "I dont have line number in my development build, and I need it"
    Your problem might lies elsewhere

    1. First, VDF you shown looks like it is hand-edited or hand-created. (including that red underline typo) I'm not sure that it is working properly? (if it is then, ok)
    I can still confirm that default upload script freshly generated with SteamPipeGUI in the screenshot still generate this "exclude PDB" line. Shown in this screenshot.
    But yep this is in Windows, I'm not sure if MacOS has this same SteamPipeGUI tool or not, or VDF required to upload Mac build would differ from Win or not.

    upload_2023-9-27_15-31-28.png

    2. If you are sure that your Steam upload script was working properly, then I would check the build setting. To properly get the most detailed line info, make sure Development Build is on (not sure about script debugging option, but I left it on)

    In Windows build it would output .DLL and .PDB, which need to go together to steam build, then to end-user when they download game to play on their PC to get the line number.

    In Mac, I only know that its .DLL counterpart is .SO, not sure if there are equivalent of PDB in mac world.

    - After uploading the build to Steam pipe, then in your steam client, try to download your own game and play as if you are customer, and check if log file will output line number that you need.

    - If not, I would try to diff between 2 folders, the fresh built one and steam downloaded one to see if any file missing by this Steam upload/download ritual. Or else it could be some specific/step in OS magic in Mac that need to be done idk.
     
    valentin56610 likes this.
  14. valentin56610

    valentin56610

    Joined:
    Jan 22, 2019
    Posts:
    156
    Hi!

    Thanks for getting back :)

    I think it is some kind of MacOS thing going on, as I did not write those files myself

    I am unsure as to how I should access the GUI for SteamPipe? I don't seem to have any executable
    If the GUI is what you're showing on your screenshot on the left, I DEFINITELY never saw this in my life

    From the little research I made, there is not such a GUI on MacOS, that's a shame!

    Yeah my VDF file works like I've been using it for the past 2 years now haha

    Yeah no if it was supposed to work as you say it would have worked by now, I think I just gotta get used to software companies not doing full ports of their stuff to Mac