【问题标题】:Executing C++ in VS code is not Clean在 VS 代码中执行 C++ 并不干净
【发布时间】:2021-04-09 03:16:48
【问题描述】:

VS code screenshot

嗨,我试图在 ubuntu 16.04 的 VS 代码中执行 C++ 程序,但是我得到的输出与我在屏幕截图中显示的其他内容混合在一起,如果我在终端中执行,我得到我的程序的干净输出与其他类似的东西混在一起:-

[1] + Done                       "/usr/bin/gdb" --interpreter=mi --tty=${DbgTerm} 0<"/tmp/Microsoft-MIEngine-In-qdt8mbun.gul" 1>"/tmp/Microsoft-MIEngine-Out-z70qnvlb.zrn

我应该如何在 VS 代码中摆脱它。

【问题讨论】:

  • 因为在 VSC 中运行时使用了调试器

标签: c++ visual-studio-code ubuntu-16.04 vscode-debugger


【解决方案1】:

在vscode中,使用ctrl+f5一般不会在程序中接受输入。为此,您必须手动设置 task.json 文件。

这里我已经为此配置了我的 vs 代码。按 ctrl+shtf+b 它将接受输入并显示输出。你可以检查一下。

VS Code Setting (Live input output) to make competitive programming easy and program analysis.

Youtube Video

【讨论】:

  • 图片的附加价值是什么
猜你喜欢
  • 2014-01-27
  • 2019-06-13
  • 2019-03-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-08-26
  • 2013-12-27
  • 1970-01-01
相关资源
最近更新 更多