Skip to content

agutenkunst/ros_vscode_tips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

VSCode Tips for ROS Development

This document shares some tips and recommendations for using VSCode for ROS development.

Extensions - Overview

General

C/C++

Python

  • ToDo

Misc

VSCode ROS Extension - Details

C++ Autocompletion

In order to have C++ Autocompletion via Intellisense C/C++ for Visual Studio Code is needed.

During the first startup in a new workspace a file .vscode/c_cpp_properties.json is created at the root of the workspace. This files contains the paths intellisense indexes. To make sure everythink is properly configured the workspace should be sourced before the first start of vscode. A proper .vscode/c_cpp_properties.json looks something like:

{
  "configurations": [
    {
      "browse": {
        "databaseFilename": "",
        "limitSymbolsToIncludedHeaders": true
      },
      "includePath": [
        "/opt/ros/foxy/include/**",
        "/home/alex/ros2_ws/src/my_package/include/**",
        "/usr/include/**"
      ],
      "name": "ROS"
    }
  ],
  "version": 4
}

After the first start of vscode the intellisense is building its index. Depending on the hardware resources and the number of files the may take a few seconds. The process is visualized by a small database icon at the lower right. TODO include image.

If all these settings are applied correctly autocomplete for C++ should now work as expected and show suggestions during typing. Use Strg+Space to show the documentation for each suggestion.

Clang-Format

VSCode GitLense Extension - Details

  • Right click: Copy Remote Url

Sources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published