VS_Code_ROS icon indicating copy to clipboard operation
VS_Code_ROS copied to clipboard

catkin_make_isolated

Open zhao-zhibo opened this issue 2 years ago • 1 comments

I need to configure VSCode step to step to debug. My codes is cartographer. But my Compile Command is catkin_make_isolated. How can I do that? Now I have a question . It is "The task provider for "catkin_cmake_isolated" tasks unexpectedly provided a task of type "catkin_make_isolated". ". Can you help me?

c_cpp_properties.json

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "c17",
            "cppStandard": "gnu++14",
            "intelliSenseMode": "linux-gcc-x64",
            "compileCommands": "${workspaceFolder}/build/compile_commands.json"
        }
    ],
    "version": 4
}

setting.json

{
    "files.associations": {
        "ostream": "cpp",
        "cctype": "cpp",
        "clocale": "cpp",
        "cmath": "cpp",
        "csignal": "cpp",
        "cstdarg": "cpp",
        "cstddef": "cpp",
        "cstdio": "cpp",
        "cstdlib": "cpp",
        "cstring": "cpp",
        "ctime": "cpp",
        "cwchar": "cpp",
        "cwctype": "cpp",
        "any": "cpp",
        "array": "cpp",
        "atomic": "cpp",
        "hash_map": "cpp",
        "hash_set": "cpp",
        "strstream": "cpp",
        "*.tcc": "cpp",
        "bitset": "cpp",
        "cfenv": "cpp",
        "chrono": "cpp",
        "cinttypes": "cpp",
        "complex": "cpp",
        "condition_variable": "cpp",
        "cstdint": "cpp",
        "deque": "cpp",
        "forward_list": "cpp",
        "list": "cpp",
        "unordered_map": "cpp",
        "unordered_set": "cpp",
        "vector": "cpp",
        "exception": "cpp",
        "algorithm": "cpp",
        "functional": "cpp",
        "iterator": "cpp",
        "map": "cpp",
        "memory": "cpp",
        "memory_resource": "cpp",
        "numeric": "cpp",
        "optional": "cpp",
        "random": "cpp",
        "ratio": "cpp",
        "regex": "cpp",
        "set": "cpp",
        "string": "cpp",
        "string_view": "cpp",
        "system_error": "cpp",
        "tuple": "cpp",
        "type_traits": "cpp",
        "utility": "cpp",
        "fstream": "cpp",
        "future": "cpp",
        "initializer_list": "cpp",
        "iomanip": "cpp",
        "iosfwd": "cpp",
        "iostream": "cpp",
        "istream": "cpp",
        "limits": "cpp",
        "mutex": "cpp",
        "new": "cpp",
        "scoped_allocator": "cpp",
        "shared_mutex": "cpp",
        "sstream": "cpp",
        "stdexcept": "cpp",
        "streambuf": "cpp",
        "thread": "cpp",
        "typeindex": "cpp",
        "typeinfo": "cpp",
        "valarray": "cpp",
        "variant": "cpp",
        "bit": "cpp",
        "core": "cpp",
        "numericaldiff": "cpp",
        "*.inc": "cpp"
    }
}

tasks.json

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "ROS: central_catkin_make",
            "type": "catkin_make_isolated",
            "args": [
                "--directory",
				"</media/zhao/ZhaoZhibo/Codes/RoadsideNotes/RoadsideNotes_add_Carto/catkin_ws>",
                "-j4",
                "-DCMAKE_BUILD_TYPE=Debug",
                "-DCMAKE_EXPORT_COMPILE_COMMANDS=1"
            ],
            "problemMatcher": "$catkin_make_isolated-gcc",
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}


zhao-zhibo avatar Jul 28 '23 03:07 zhao-zhibo

Hi @boyaloveu,

I have tried to use the catkin_make_isolated with the multiroot setup and that seems to work fine. Could you add .vscode folders to the actual nodes you want to build and debug, like in the example project here in the repo?

This also simplifies debugging multiple nodes anyway and is at least my prefered setup for debugging.

Here is an minimal catkin_ws with just this project as the only node inside the catkin_ws: image

Your .vscode folder with the launch and task.json should be inside the node you want to build and debug.

lzptr avatar Aug 14 '23 19:08 lzptr