Wallace
Wallace

Reputation: 17419

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?

Upvotes: 13

Views: 23616

Answers (2)

Andrew
Andrew

Reputation: 1

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.

Upvotes: 3

John Donaghy
John Donaghy

Reputation: 214

As documented here this can be achieved using this setting:

"console": "externalTerminal"

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

Upvotes: 19

Related Questions