c - 在 VSCode - C 中将 coreDumpPath 添加到 launch.json
问题描述
我的launch.json
文件如下:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "gcc - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: gcc build active file",
"miDebuggerPath": "/usr/bin/gdb",
"coreDumpPath": "${fileDirname}/${fileBasenameNoExtension}"
}
]
}
我启动调试器时的问题是:
Unable to start debugging. Unexpected GDB output from command "-target-select core /../../../C/helloWorld". "/../../../C/helloWorld is not a core dump: file format not recognised."
我在网上搜索了一个解决方案,但我不知道核心转储文件的正确文件格式是什么。
解决方案
推荐阅读
- android - 从 ImageView Android 的左边缘裁剪
- java - 为什么我的数据库没有正确更新我的值?
- php - 不显示我的参考链接
- python - 仅对时间序列中的某些数据点应用校正,这些数据点通过值快速下降来识别
- python - ValueError:输入数组应具有与目标数组相同数量的样本。找到 1600 个输入样本和 1800 个目标样本
- xml - ant 编译没有显示类
- c# - Unity:如何将 AssetBundle 构建到每个 AssetBundle 的单独目录中
- javascript - Discord.js 和 discord.js-commando 防止命令在特定通道中运行
- c# - 将 aspnet 核心作为服务运行 - nssm 与 RunAsService
- merge - SAS:合并具有不同名称的相同变量的两个数据集