visual-studio-code - 使用 Visual Studio Code 'Makefile' 扩展时如何启用漂亮打印
问题描述
我正在将 VS Code 用于 Linux 中的 C++ 项目。它有一个 Makefile,所以我在 VS Code 中启用了 Makefile 扩展( https://devblogs.microsoft.com/cppblog/now-announcing-makefile-support-in-visual-studio-code/][1] 。
我可以成功构建、调试和执行。但是,当我使用 Makefile 扩展进行调试时,我无法弄清楚如何自动启用漂亮的打印。我的“launch.json”文件确实有
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
但是,Makefile 扩展名似乎忽略了这些设置。相反,它似乎有自己的 settings.json 文件,其中一部分如下,但它不接受setupCommands
上述内容:
"makefile.launchConfigurations": [
{
"cwd": "/path/to/bin",
"binaryPath": "/path/to/executable",
"binaryArgs": []
}
],
解决方案
推荐阅读
- python - 如何将具有值的多个运算符作为参数传递给python方法
- c# - 对表存储执行事件溯源预测
- rust - Arcs 中的元组如何用引用解构?
- javascript - 使用 Nuxt/Firebase 的项目架构
- firebase - Firebase Firestore - 在包含数十亿文档的单个集合上执行多个同时读取查询
- c++ - 一种限制模板参数顺序的更简单方法
- matlab - GA stepGA - 索引超出矩阵维度
- java - 想要将 json 字符串转换为包含 xml 的 json 对象
- mysql - 连接多个表时如何创建正确的mysql查询
- python - 是否可以在其中一列是列表的数据框中使用 h2o 决策树?