【发布时间】:2020-03-26 15:14:55
【问题描述】:
当我运行调试时,我的程序的输出没有显示在集成终端上。 这实际上曾经在几天前起作用。我没有更改任何配置文件,但可能由于更新,这已经改变了。
请注意,lldb 没有 "console" 选项。
这也造成了我无法为正在运行的程序提供输入的主要问题。
这是我在集成终端中看到的:
[1] + Done "/usr/bin/lldb-mi" --interpreter=mi --tty=${DbgTerm} 0<"/tmp/Microsoft-MIEngine-In-871ntlpp.93i" 1>"/tmp/Microsoft-MIEngine-Out-msz8v24g.agq"
就是这样。使用"externalConsole":true时也是如此。
如何将当前调试终端中的任何输出保留在其中,同时还能看到正常的程序输出并能够在集成终端中提供输入?
此外,这种行为让我想到,目前,拥有集成终端的意义何在?那里什么都没有发生。
这是我的配置文件:
"version": "0.2.0",
"configurations": [
{
"name": "clang++ build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "lldb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "clang++ build active file",
"miDebuggerPath": "/usr/bin/lldb-mi"
}
]
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "clang++ build active file",
"command": "/usr/bin/clang++",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "/usr/bin"
},
"problemMatcher": [
"$gcc"
],
"group": "build"
}
]
【问题讨论】:
标签: c++ linux visual-studio-code lldb vscode-debugger