vscode中C++调试launch.json配置

.vscode目录下,

launch.json内容,

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "cc",
            "type": "cppdbg",
            "request": "launch",
            "preLaunchTask": "make",
            "program": "/home/fyw/bin/run_cloud_aggregation",
            "args": [
                "--output_cloud_res=/home/fyw/download/junction_17629/res",
                "--inputjson=/home/fyw/download/junction_17629/in.json",
                "--deploy_path=/opt/work/csm_workspace/csm_alg_sched/../exec/output/model/"
            ],
            "stopAtEntry": false,
            "cwd": "/home/fyw",
            "externalConsole": false,
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "linux": {
                "MIMode": "gdb"
            },
            "miDebuggerPath": "/usr/bin/gdb"
        }
    ]
}

各字段介绍如下:

  1. program表示可执行文件。
  2. args表示传入参数。
  3. cwd表示当前工作目录。
  4. miDebuggerPath表示调试器目录。

tasks.json内容,

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "make",
            "type": "shell",
            "command": "sh /home/fyw/run.sh"
        }
    ]
}

相关推荐

  1. vscodeC++调试launch.json配置

    2024-03-16 07:56:03       37 阅读
  2. 配置 VSCode C++ 调试时, 常见错误教程

    2024-03-16 07:56:03       32 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-03-16 07:56:03       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-03-16 07:56:03       106 阅读
  3. 在Django里面运行非项目文件

    2024-03-16 07:56:03       87 阅读
  4. Python语言-面向对象

    2024-03-16 07:56:03       96 阅读

热门阅读

  1. 零基础入门多媒体音频(2)-音频焦点2

    2024-03-16 07:56:03       42 阅读
  2. 排序算法-一天两个之冒泡、选择排序

    2024-03-16 07:56:03       37 阅读
  3. 前端实现websocket通信讲解(vue2框架)

    2024-03-16 07:56:03       51 阅读
  4. PMS150C系列 应广8位OTP IO单片机

    2024-03-16 07:56:03       44 阅读
  5. ASP.NET-WebFoms常见前后端交互方式

    2024-03-16 07:56:03       46 阅读
  6. AcWing 4964.子矩阵

    2024-03-16 07:56:03       40 阅读
  7. Kafka的分区(partition和副本)

    2024-03-16 07:56:03       39 阅读
  8. android studio配置gradle

    2024-03-16 07:56:03       39 阅读
  9. 什么是深度学习?

    2024-03-16 07:56:03       41 阅读
  10. 【学习】目标检测中的anchor

    2024-03-16 07:56:03       38 阅读
  11. MacOS安装Homebrew详细教程以及案例

    2024-03-16 07:56:03       40 阅读