Search Unity

where is debug output in visual studio

Discussion in 'Scripting' started by fj33xx, Jul 31, 2014.

  1. fj33xx

    fj33xx

    Joined:
    Feb 17, 2013
    Posts:
    4
    Hi, I just hooked up visual studio and unity and could run from vs directly. But the output from Debug.log is nowhere to be found in visual studio. Anyone know where it outputs to?
     
  2. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    It outputs to the Unity console. Double-click the status bar at the bottom of Unity to open it. It also writes to a text file which on Windows is in %localappdata%/Unity/Editor/Editor.log. If you download the newly-free Visual Studio Tools For Unity: http://unityvs.com/ it should also echo everything from the Unity console back over to the Visual Studio console.
     
  3. fj33xx

    fj33xx

    Joined:
    Feb 17, 2013
    Posts:
    4
    Thanks for reply.

    I'm using unityvs now. I attach the program to unity first and then run the game in unity, that way, I was able to debug the script. However, the unity crashes often if I start from visual studio when the game is still running, Does that mean I have to follow exact order when debugging?
     
  4. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Yeah I've had it crash sometimes too if I try to debug while the game is already running... it's supposed to work, but it doesn't always. Starting in visual studio first and then pressing play in the game is usually safer.
     
    fj33xx likes this.