Search Unity

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:
    25
    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:
    156
    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:
    25
    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:
    5,412
    is debug log enabled in console?
    upload_2019-1-4_21-16-8.png
     
  8. amrazyan

    amrazyan

    Joined:
    May 9, 2018
    Posts:
    8