当前位置:网站首页>在VScode里调试ROS程序
在VScode里调试ROS程序
2022-08-03 02:08:00 【wings0728】
launch文件还是不知道如何调用,这里是说单个node怎么调用
- 在Extensions内安装ROS插件

- 生成并配置launch.json(修改对应的program项)
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch", // 配置名称,将会在调试配置下拉列表中显示
"type": "cppdbg", // 调试器类型 该值自动生成
"request": "launch", // 调试方式,还可以选择attach
"program": "${workspaceFolder}/devel/lib/hj_mapping/hj_mapping_hjMapping", //要调试的程序(完整路径,支持相对路径)
"args": [], // 传递给上面程序的参数,没有参数留空即可
"stopAtEntry": false, // 是否停在程序入口点(停在main函数开始)
"cwd": "${workspaceFolder}", // 调试程序时的工作目录
"environment": [], //针对调试的程序,要添加到环境中的环境变量. 例如: [ {
"name": "squid", "value": "clam" } ]
"externalConsole": false, //如果设置为true,则为应用程序启动外部控制台。 如果为false,则不会启动控制台,并使用VS Code的内置调试控制台。
"MIMode": "gdb", // VSCode要使用的调试工具
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"miDebuggerPath": "/usr/bin/gdb"
}
]
}
- 把package内的CMakelist设置成debug模式,并编译
set(CMAKE_BUILD_TYPE Debug)
#set(CMAKE_CXX_FLAGS "-std=c++11")
set(CMAKE_CXX_FLAGS "-std=c++14")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g -pthread")
- 正式调试即可

边栏推荐
- 一篇文章玩明白Stack-migration
- IDEA基本使用-创建和删除项目
- PHICOMM(斐讯)N1盒子 - Armbian5.77(Debian 9)配置自动连接WIFI无线网络
- The LVS load balancing cluster and the deployment of the LVS - NAT experiment
- How does Excel compare if two columns of strings are the same?
- [Arduino] Reborn Arduino Monk (3)----Arduino function
- Mysql-如何进行慢SQL查询
- Conversational Technology!
- 征集 |《新程序员》专访“Apache之父”Brian Behlendorf,你最想问什么?
- 370万欧元!西班牙iPronics加速可重构光子芯片商用
猜你喜欢

The cornerstone of high concurrency: multithreading, daemon threading, thread safety, thread synchronization, mutual exclusion lock, all in one article!...

.NET in-depth analysis of the LINQ framework (four: IQueryable, IQueryProvider interface details)

qt opengl 使用不同的颜色绘制线框三角形

无法启动服务 错误 193 0xc1

Mysql-如何进行慢SQL查询

一次偶然的钓鱼文件分析

Postman如何做接口自动化测试?

南瓜科学新品上线 开辟益智玩具新世界

mysql-installer安装教程(详细图文)

Incorrect datetime value: '2022-01-01' for function str_to_date
随机推荐
容联云发送验证码
WordPress博客问答小插件
EasyGBS播放器优化:设备通道视频播放出现跳屏问题的修复
Rust Web(三)—— 通过sqlx连接数据库(MySQL)
数据中台建设(八):数据服务体系建设
思维+启发式合并
IDEA基本使用-创建和删除项目
实现统一账号登录,sonarqube集成ldap
常用工具链和虚拟环境-TDMGCC
ROS通信模块:秒懂话题通信
Kubernetes:(八)调度约束和故障排查
孩子坐不住就是不专注?猿辅导揭秘专注力的三大误区
通过kubernetes可视化界面(rancher)安装kibana
Topic Modeling of Short Texts: A Pseudo-Document View
钻石基础知识介绍
Wei Dongshan Digital Photo Frame Project Learning (5) Transplantation of libjpeg-turbo
一些面试的总结
Jenkins2.328+sonarqube7.9 实现代码自动化检测
问题记录:jenkins构建时报错The goal you specified requires a project to execute but there is no POM in...
initramfs详解----设备文件系统