Search Unity

How to debug and understand codeflow of projects as a new developer ?

Discussion in 'Scripting' started by Sam128, May 31, 2021.

  1. Sam128

    Sam128

    Joined:
    Nov 21, 2017
    Posts:
    9
    I am one of the new developers joining a startup and its not well managed. There are chunk of unity projects but it's pain to read through individual scripts and understand callbacks and how scripts are relating to one another.

    Wanted to know i there a way to debug and analyze existing applications and understand code flow ? If yes what sort of tools you would use ?
     
  2. Lekret

    Lekret

    Joined:
    Sep 10, 2020
    Posts:
    358
    Debugger. Open IDE, add breakpoint, connect to Unity, launch game, play until some piece of code, watch entire call stack and how does it work.
    Debug.Log in console also have call stack btw.
    It seems the only way to analyze existing code without anyone's help, at least I don't know other tools.
     
    Kurt-Dekker likes this.
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,740
    Everything that @Tekrel says above... and then your own detective sleuthing talent brought to bear on it.

    I've come into a lot of very large projects and when you are first staring at a giant pile of stuff and nobody can tell you anything about it, that can be very daunting.

    But it can be solved and approached and worked on as long as you stick with it and methodically unravel the puzzle.

    What you are doing is the task that sets a senior developer apart from junior developers.

    This is your chance to really rise and expand your brain in ways you never thought possible, and to gain confidence and develop strategies to figure out what is going on.

    I recommend isolating small systems and drilling into them to understand how each part works. This will help you build that confidence.