How do I set up Visual Studio Code to open the console in a new window?

Asked

Viewed 6,076 times

8

In previous versions of the Visual Studio Code was opened in a window outside the Visual Studio Code, but in the new versions this screen of Console started to be opened inside the Visual Studio Code, which makes debugging very difficult, as the console window takes up considerable space, which decreases the size of the other windows. We can see this in the image below:

inserir a descrição da imagem aqui

For example, with the console window open inside the Visual Studio Code, the windows of the source files end up getting too narrow, and to view all the code I have to close the screen of the console.

Before, however, it was possible to keep both windows open without one interfering with the other’s area. This was because the Visual Studio Code was opened in a window external to the application, and so I could see both the source file and the console screen simultaneously, without the console screen getting in the way of the source area.

My question is whether there is a setting to make the Visual Studio Code open the console again in an external window and how to configure it for this.

  • Is resetting VS settings an option? If you want https://msdn.microsoft.com/pt-br/library/ms247075(v=vs.90). aspx

  • @Paulohdsousa in this case not, because it is already with the default settings. I looked through all the configuration options and found none related to this console screen.

  • Usually in all versions of Visual Studio, just right click on the tab title (in this case, Debug Console) and select the option Float. But in new versions a Microsoft has been taking this feature because of feedbacks in your program Insiders.

  • 1

    you already solved?

  • 1

    @durtto Recently they made a new change in the positioning of the console window, placing this window now horizontal, dividing the screen area to be half source code and half console. I thought it was a lot better than the way it was when I asked that question, but I still much preferred it when it was a separate window. I think the only way to fix this is to take a vote supporting the return of this console window to what it was originally. Even so, the developers of Visual Studio Code must have their reasons for doing this.

  • I understand. So try to create an answer to your question. So you can help other people by not leaving the question open.

  • @Ulysses I researched about and I found something that might help you, it’s about changing the default console in vs code by Conemu (conemu.github.io), below follow some links I hope to help you. Extension to set the console in vs code Conemu VS Code

  • @Charleswilliam took a look at the links you gave me. Although they were not the solution I was looking for, one way or another they eventually led me to search the right way on Google, and I found in the Visual Studio Code documentation what we need to do to run the console in the external window. It’s a simple thing, and I added an answer explaining how to solve this problem. Thank you for your contribution!

  • @durtto Yes. I just solved.

  • I have already gone through the reverse problem. I want my terminal to open in VS Code and not highlighted.

  • 1

    @Article looks at my answer below. It may be that it works for you by configuring the option "externalConsole" to have the value "false".

  • @Ulyssesalves as amazing as it sounds I got today. I had to disable "Use Legacy Console" in the prompt properties. I also unchecked the option "Features/Terminal/ Integrated: Inherit Env... the latter I doubt because there is a note saying it does not work for Windows. Thank you for the reply!

Show 7 more comments

2 answers

1

0


I finally figured out how to open the console in a window external to Visual Studio Code.

According to the Visual Studio Code debugging documentation, just add, in the file Launch.json, the entrance "externalConsole": true to the JSON of the Runner configuration you want to run with the console opened in the external window, as shown in the image below:

inserir a descrição da imagem aqui

Apparently, the value of this entry is false by default, and therefore it is necessary to change it to true in the Runners settings you want to run with the console in the external window.

For example, my configuration was as follows:

"configurations": [
    {
        ...
        "externalConsole": true,
        ...
    },

Browser other questions tagged

You are not signed in. Login or sign up in order to post.