vscode进行DebugROS工程的launch文件

17 篇文章 2 订阅
16 篇文章 0 订阅

0. 首先需要安装ROS插件(Microsoft),已经建立建立ros项目工程, 在功能包CMakeLists.txt目录下打开终端, 执行: code . 打开ros项目

1. 点击F5, 启动debug(Start Debugging), 弹出对话框, 点击打开launch.json.

2. 将configurations里面的东西删掉如下:

{
    // 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": [


    ]
}

3. 然后点击右下角的Add Configuration, 选择: ROS: Launch, 如下:

        {
            "name": "ROS: Launch",
            "type": "ros",
            "request": "launch",
            "target": "absolute path to launch file"
        }

4. 将launch文件的绝对路径加到target里面即可.

5. 注意在CMakeLists.txt里面添加:

set(CMAKE_BUILD_TYPE "RelWithDebInfo")

6. 然后catkin_make编译项目

7. 最后点击F5即可设置断点debug了.        

详情参考: vscode-ros/debug-support.md at master · ms-iot/vscode-ros · GitHub

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值