Search Unity

Feedback Debugging

Discussion in 'Scripting' started by MartinMa_, May 4, 2021.

  1. MartinMa_

    MartinMa_

    Joined:
    Jan 3, 2021
    Posts:
    455
    Hello guys i am currently working on my game and its architecture gets quite complicated can you recomeand me some good debugging tool?Debug.Log is not enough because i am running alot of things in alot of scrips i was trying to use debug mode in Unity but i cant get it working.I need something what show me what code from what script is running step by step.

    I can type in google "debugging Unity" thats not a problem, but i want some recomandation from people who have experience with some good "utility".

    Thanks for help.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,742
    How about attaching the debugger? That works pretty well for me! There's tutorials aplenty.
     
  3. MartinMa_

    MartinMa_

    Joined:
    Jan 3, 2021
    Posts:
    455
    YOu mean this?

    https://dev.to/dotnet/unity-105-debugging-and-analyzing-g00

    This not doing what i am loking for because i need to find why one thing is happening but i dont know what does it, maybe i need some kind of log.Lets say Debug.Log but for all scripts and all lines.
     
    Last edited: May 4, 2021
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,742
    Munchy2007 likes this.
  5. MartinMa_

    MartinMa_

    Joined:
    Jan 3, 2021
    Posts:
    455
  6. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,735
    Attaching the VS debugger to Unity allows you to set breakpoints, single step through code, see values of variables, etc etc. I'm not sure what you mean by the second half of your 'sentence', but Unity already outputs everything to a log file.
     
  7. MartinMa_

    MartinMa_

    Joined:
    Jan 3, 2021
    Posts:
    455
    And can you please tell me where i can find this log?I fixed my issue without it but i like to find it anyway.It is nowhere in my project folder or not in application path.I want log from playmode not from build
     
  8. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,735
    https://docs.unity3d.com/Manual/LogFiles.html do any of these help? (Player is the one I think you might be after)

    Edit: If you're building for Android, then installing Android.Logcat from the package Manager will enable you see output logs from the built app as it runs.

    Otherwise you should be able to roll your own solution using this https://docs.unity3d.com/ScriptReference/Application-logMessageReceived.html
     
  9. MartinMa_

    MartinMa_

    Joined:
    Jan 3, 2021
    Posts:
    455
    This is the one o think thanks C:\Users\username\AppData\Local\Unity\Editor\Editor.log