zoukankan      html  css  js  c++  java
  • 如何让vscode C++ 终端不再显示调试启动信息

    按照微软的官方文档(https://go.microsoft.com/fwlink/?LinkID=533484#vscode)配置好C++环境之后。

    每次按F5都会在终端输出,但是会附加一串信息。例如:

    hello world
    [1] + Done                       "/usr/bin/gdb" --interpreter=mi --tty=${DbgTerm} 0<"/tmp/Microsoft-MIEngine-In-tih6ti0q.cz0" 1>"/tmp/Microsoft-MIEngine-Out-s6ibdwj6.pwh"

    实际上这些信息是我们发送到gdb的命令,以允许终端使用VS Code。

    更确切的说

    "The text you are seeing is the command we need to send to gdb to redirect its stdin/stdout/stderr so that we can communicate with it from the debug adapter. In changing to allow integratedTerminal, we also chose to allow VS Code to handle all the terminal launching for external console too due to a request by the community to support more than just xTerm and gnomeTerminal."

    解决方案是在launch.json中添加:

    "miDebuggerArgs": "-q -ex quit; wait() { fg >/dev/null; }; /bin/gdb -q --interpreter=mi"

    参考github之vscode项目issue地址:

    https://github.com/microsoft/vscode-cpptools/issues/3298

  • 相关阅读:
    大二暑假学习第一周
    PyQt5+pycharm 中对生成的.py文件无法运行的问题
    尚筹网19总结
    尚筹网19项目部署
    MAC远程连接Linux
    尚筹网17订单、支付
    尚筹网16确认回报、订单
    支付宝沙箱环境
    内网穿透
    支付宝开发平台使用
  • 原文地址:https://www.cnblogs.com/BYGAO/p/14593308.html
Copyright © 2011-2022 走看看