Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Visual Studio Code, launch a Console application in an external window

I have a Console application open in VS Code. When I press Ctrl-F5, the output of my program is displayed in a DEBUG CONSOLE window, along with other text.

How do I get Visual Studio code to launch my program in a new console window?

like image 632
Wallace Kelly Avatar asked Nov 01 '16 19:11

Wallace Kelly


Video Answer


2 Answers

As documented here this can be achieved using this setting:

"console": "externalTerminal"

The settings file is in the solution directory: .vscode/launch.json .

like image 120
John Donaghy Avatar answered Oct 04 '22 17:10

John Donaghy


When you're just using Tasks and not Launchers, you can follow the advice here.

For me on Linux, I changed my shell command in VSCode from command to gnome-terminal -e command. That did the trick; that's all I had to do.

Note that if you do this you can get rid of the presentation option set from your task.

like image 24
Andrew Avatar answered Oct 04 '22 19:10

Andrew