Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Debug.Log

Discussion in 'FPS.Sample Game' started by amrazyan, Jan 2, 2019.

  1. amrazyan

    amrazyan

    Joined:
    May 9, 2018
    Posts:
    8
    How can I debug normally, like always used to do
     
  2. Aquastar

    Aquastar

    Joined:
    Jul 17, 2013
    Posts:
    29
    What is the problem? Can't you set breakpoints?
     
  3. amrazyan

    amrazyan

    Joined:
    May 9, 2018
    Posts:
    8
    upload_2019-1-3_15-13-47.png
     
  4. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    Ah, well the console you are seeing is printed to the UI element when the game is running. You could write a script that spits out that console text to debug https://docs.unity3d.com/ScriptReference/Debug.Log.html

    That said, you could also go the longer route, and hunt down all the console scripts and add the output to not just go to the in-game console but also be output as editor console.

    But when you run this game, the editor console wont exist. Only the in-game console will exist, so you are asking for an editor feature.

    Scrape the in-game console to editor-debug, or add lines to all the console scripts to export to the editor debug as well.
    You could trunk it all to a file as well, so when the editor/game is closed you still have the details.

    GL HF
    Micah
     
  5. Aquastar

    Aquastar

    Joined:
    Jul 17, 2013
    Posts:
    29
    Most of this project used GameDebug.Log to output logs. Logs should be forwarded to Debug.Log if GameDebug.forwardToDebug is true (when in the editor). Maybe you should trace the variable "forwardToDebug" is set correctly.
     
  6. amrazyan

    amrazyan

    Joined:
    May 9, 2018
    Posts:
    8
    no there is nowhere used GameDebug , I'm using simple Debug.Log
     
  7. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    6,077
    is debug log enabled in console?
    upload_2019-1-4_21-16-8.png
     
  8. amrazyan

    amrazyan

    Joined:
    May 9, 2018
    Posts:
    8
unityunity