VS Code starts debugging in the embedded terminal instead of the debug console

I have been using VS Code for a long time, and only today I had this strange problem. Previously, if I started debugging a program (F5), it would start debugging and show the output in the "debug console":

enter image description here

But now it launches the debugger in the "Terminal" enter image description here, and also displays in the "Debug Console".

Here is my launch.json:

{
    "version": "0.2.0",
    "configurations": [{
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}"
        }
    ]
}


I want output only in the "debug console" (previously the default behavior). Please help me bring it back to its previous state.

+20
source share
6 answers

Edit 3

2019.4.0 python, console internalConsole (# 4321).

2

omartin2010,

"internalConsoleOptions": "openOnSessionStart"

.

1

, none none . .

"console": "none"

, , debugOptions. launch.json :

"debugOptions": [
    "RedirectOutput"
]
+22

, , , :

{
    "name": "Python: Current File",
    "type": "python",
    "request": "launch",
    "program": "${file}",
    "console": "none"
},

, . "Python: Terminal ()". , . , , , .

+8
{
    "name": "Python: Current File",
    "type": "python",
    "request": "launch",
    "program": "${file}",
    "stopOnEntry": false,
    "console": "none"
},

launch.json .

+4

, , , ... , :

{
...
            "internalConsoleOptions": "openOnSessionStart",
...
}

+2
source

The accepted answer did not work for me, as it is not suitable for my version of VSCode Version 1.30.2 (1.30.2):

Unknown console type 'none'.

The solution for me was to use a parameter instead internalConsole. I believe this should be the default for the integratedTerminalterminal option in my version.

Here is an example:

NOTE: this is an example from my nodejs project but the console portion is still relevant regardless of project type. have included more to show some context as well as other features such as envFile usage.

...    
{
    "type": "node",
    "request": "launch",
    "name": "Launch Program",
    "envFile": "${workspaceRoot}/.env",
    "program": "${workspaceFolder}/src/index.js",
    "autoAttachChildProcesses": true,
    "console": "internalConsole"
},
...
0
source

Preferred answer above setting

    "console": "none" 

now gives an error.

New use

    "console": "internalConsole"

There is a bug here on GitHub for updating the documentation here .

0
source

Source: https://habr.com/ru/post/1695571/


All Articles