Search Unity

How to get stack trace file on Android?

Discussion in 'Getting Started' started by raklear, Jan 15, 2022.

  1. raklear

    raklear

    Joined:
    Dec 1, 2021
    Posts:
    1
    I am developing a game on an android device, and i have android studio Logcat window open on my laptop to show me the stack trace and exceptions.
    The problem is that my game is heavily dependant on the phone sensors, so sometimes i want to test the game by walking around and moving the phone. Whenever i do that i don't have Logcat available, so i did some writing to a log.txt file from within the code so after i am done playing i can look at the text file.
    Unfortunately this is not scalable as i need to create hundrads of extra line of codes just to write to log.txt
    I have googled a lot but this is the first time i have not found a solution.
    I have also looked at the auto-generated IL2CPP folder in my app file on the phone but there was nothing there that helped.
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,916
    raklear likes this.
  3. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446