markdown Visual Studio代码技巧

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown Visual Studio代码技巧相关的知识,希望对你有一定的参考价值。

## Setup C++ Intellisense paths

If you use CMake there is an easy way to setup all paths. Add to your `CMakeLists.txt`

```
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
```

Than press `Ctrl+Shift+P` (or `Ctrl+Cmd+P`) and select `C/Cpp Edit configurations`. Then add

```json
{
  "configurations": [
    {
      ...
      "compileCommands": "${workspaceFolder}/build/compile_commands.json",
      ...
    }
  ]
}
```

## Debug ROS applications

### ROS nodes

> TODO

### Others

Create a bash script that source the environment and run gdb, e.g.
```sh
#!/usr/bin/env bash

source ~/ws/devel/setup.bash
/usr/bin/gdb "$@"
```

Than in the `launch.json` add the `miDebuggerPath`, pointing to the script.

以上是关于markdown Visual Studio代码技巧的主要内容,如果未能解决你的问题,请参考以下文章

markdown Visual Studio代码技巧

markdown Visual Studio代码

markdown (原始)VSCode visual studio代码快捷方式

无需离开 Visual Studio 即可编写 Markdown

无需离开 Visual Studio 即可编写 Markdown

Visual Studio Code 配置 Markdown