vscode ros_python ros_cpp ros_launch Debug

1.ros_python launch.json

ros_python Debug

主要看上面链接
 {
    // 使用 IntelliSense 了解相关属性。 
    // 悬停以查看现有属性的描述。
    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: 当前文件",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "justMyCode": true
        }
    ]
}

2.Ros_cpp

launch.json
{
    // 使用 IntelliSense 了解相关属性。 
    // 悬停以查看现有属性的描述。
    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name":"(gdb)Launch", //配置名称,将会在调试配置下拉列表中显示
            "type":"cppdbg",      //调试器类型 该值自动生成 
            "request": "launch",  // 调试方式,还可以选择attach             
            "program": "${workspaceFolder}/devel/lib/salsanext/salsanext_trt_ros", //要调试的程序(完整路径,支持相对路径)
            "args":[],            //传递给上面程序的参数,没有参数留空即可
            "stopAtEntry": false, //是否停在程序入口点(停在main函数开始)
            "cwd":"${workspaceFolder}", //调试程序时的工作目录
            "environment": [],        //针对调试的程序,要添加到环境中的环境变量,例如:[{"name":"squid","value":"clam"}]
            "externalConsole": false, //如果设置为true,则为应用程序启动外部控制台。如果为false,则不会启动控制台,并使用VS Code的内置调试控制台
            "MIMode": "gdb",      //VSCode要使用的调试工具名称
            "preLaunchTask": "catkin_make", // 这个重要,需要与task中的label相同
            "setupCommands": [
                {
                "description": "Enable pretty-printing for gdb",
                "text": "-enable-pretty-printing",
                "ignoreFailures": true
                }
            ],  
        }
    ]
}




tasks.json
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "catkin_make",
            "type": "shell",
            "command": "catkin_make",
            "args": [],
            "group": "build",
            "presentation": {
                "reveal": "always"
            },
            "problemMatcher": "$msCompile"
        },

    ]
}
 

3.Ros_launch 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": "ROS: Launch",
            "request": "launch",
            "target": "/home/ms/detection/ros_train/cplus_ws/src/cplus_pub_sub/launch/pub_sub.launch",
            "launch":[
            "rviz",
            "gz",
            "gzclient",
            "gzserver"
            ],
            "type":"ros"
        }
    ]
}

总结

最重要的,拥有跟随内心与直觉的勇气,你的内心与直觉多少已经知道你真正想要成为什么样的人。任何其他事物都是次要的。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值