Search Unity

Debug.Writeline

Discussion in 'VR' started by Almypal, Jul 20, 2017.

  1. Almypal

    Almypal

    Joined:
    Jun 29, 2017
    Posts:
    20
    Hello All,

    I can't seem to find a clear cut answer for this. I have some code that can't run in Unity that I want to debug in VS.

    I would think adding :

    #if !UNITY_EDITOR
    System.Diagnostics.Debug.WriteLine("test")
    #endif

    would work. Unfortunately, it doesn't show up in the VS window.

    Any ideas.

    Thanks
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Use UnityEngine.Debug.Log instead.
     
  3. Almypal

    Almypal

    Joined:
    Jun 29, 2017
    Posts:
    20
    Doesn't that only show up in the unity?
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    It will show up in VS as well.