【发布时间】:2020-03-25 23:21:09
【问题描述】:
我想弄清楚为什么漂亮的打印不能正常工作。我已经查看了很多地方,试图找出它为什么不起作用,但我还没有找到解决方案。
问题来了:
如您所见,矢量state 没有显示其元素。这是我的launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "gdb",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "C:\\MinGW\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "build"
}
]
}
这是我的tasks.json:
{
"tasks": [
{
"type": "shell",
"label": "build",
"command": "C:\\MinGW\\bin\\g++.exe",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "C:\\MinGW\\bin"
}
}
],
"version": "2.0.0"
}
【问题讨论】:
标签: c++ visual-studio-code mingw