vscode 调试终端不关闭_VS Code在集成终端而不是调试控制台中开始调试

I've been using VS Code for quite some time and just today I started having this strange issue. Previously if I started debugging an program (F5) it would start debugging and show output in the "Debug Console":

But now It starts debugger in the "Terminal"

and also outputs to "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 default behavior). Please help me with setting it back to the way it was.

解决方案

Edit 3

As with the release 2019.4.0 of the python extension it is now possible to set the console option to internalConsole (#4321).

In .vscode/launch.json:

"console": "internalConsole"

Edit 2

As suggested in omartin2010's answer you can additionally set the option

"internalConsoleOptions": "openOnSessionStart"

to automatically open the debug console when starting debugging.

Edit 1

Setting the "console" option explicitly to "none" was originally the way to go (see answers), but now "none" is no longer valid (see Edit 3 above)

"console": "none"

Original answer

To ensure that the output is written to the debug console you can set the debugOptions.

Adding the following entry to your configuration in yourlaunch.json should fix it:

"debugOptions": [

"RedirectOutput"

]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值