This directory contains tools which is useful for developers using VSCode.
It is recommended to use devcontainer, or setting up an equivalent environment. Recommended extensions and settings are listed in devcontainer.json.
tools/vscode/refresh_compdb.sh
is a script to refresh compilation database, it may take a while
to generate all dependencies for code completion, such as protobuf generated codes, external dependencies.
If you changed proto definition, or changed any bazel structure, rerun this to get code completion
correctly.
Note that it is recommended to disable VSCode Microsoft C/C++ extension and use vscode-clangd
instead for
C/C++ code completion.
tools/vscode/generate_debug_config.py
is a script to generate VSCode debug config in .vscode/launch.json
.
The generated config will be named <debugger type> <bazel target>
.
For example:
tools/vscode/generate_debug_config.py //source/exe:envoy-static --args "-c envoy.yaml"
Generates an entry named gdb //source/exe:envoy-static
for GDB in launch.json
. It can be
used to generate config for tests also.
The generated gdb
config are compatible with Native Debug extension,
lldb
config are compatible with VSCode LLDB extension.