Why doesn't Console.WriteLine work in Visual Studio Code?

Matt West picture Matt West · Apr 5, 2017 · Viewed 11.5k times · Source

I have scriptcs and coderunner installed on Visual Studio Code. When I run a simple program that includes Console.WriteLine("Test") I don't see any output. The program seems to run successfully and exits with code 0.

Any suggestions?

Here's all the code in case anyone is interested:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine("Test");
    }
}

Answer

Tim picture Tim · Dec 12, 2017

In launch.json there should be a field called 'console':

Changing it from:

  "console": "internalConsole",

To:

  "console": "externalTerminal",

fixed it for me.