Stop Using Debug.Log

Поділитися
Вставка
  • Опубліковано 21 вер 2024
  • The only Unity debugging tutorial you need

КОМЕНТАРІ • 9

  • @mynameisxboard
    @mynameisxboard Рік тому +12

    I see what you mean but I must disagree here. Debug.Log is much more than trying to debug your methods. Sure, for debugging your methods like you do in this video it is very simple to attach the debugger but as I mentioned it just is much more.
    - You can add a debug log to variables to get a result much faster. Say you want to see what object you have clicked on with a raycast. If you just like to see what you have clicked a debug log is faster instead of the debugger pausing your game every time when it hit a breakpoint.
    - You can add a second argument to debug.Log where you pass along the object that calls the log, when you then press it in the inspector you'll immediately focus on that object in the hierarchy. Making it very useful to visually debug in Unity. Especially if there are a lot of objects that get spawned like enemies, players,...
    - In the QuickMaths function you were debugging, why store the listlength and then not use it? You could just put the numberList.Count in the Print line and then everything is fixed?
    I get that you want to promote/teach the use of the debugger (it's a very useful tool) but your title is misleading and might confuse beginners to not use debug.log.
    You should try and promote debug.log where it's useful and tell people where to use it and where to use the VS debugger :)

  • @dbweb.creative
    @dbweb.creative Місяць тому

    If you have such a mess of a code that you need to step through with a debugger - you might be doing something wrong. A simple temporary Debug.Log here and there for a quick check should be enough. Otherwise you can also check the call stack to see what was called, and where it went wrong.

  • @nevfely
    @nevfely Рік тому

    Nice info. I have used it in non game stuff but i havent thought of using it with Unity. thx for the tip and listening nier music while learning stuff feels good ^__^

  • @farvardinmainyu1961
    @farvardinmainyu1961 Рік тому

    Very helpful, thank you so much.

  • @sxsignal
    @sxsignal Рік тому

    awesome thnx!

  • @VladislavMusicBand
    @VladislavMusicBand 7 місяців тому

    hi! I'm trying to upload a 3d model to unity store, they say "Check Model Import Logs
    Model assets should work without issues. Please make sure that there are no errors or warnings when these models are imported." what do I do wrong? What does it mean?

  • @csaratakij6339
    @csaratakij6339 Рік тому

    No