This example has 2 useful scripts
bazel run //:copy_compile_commands
- A way to generatecompile_commands.json
so that you may use a language server such as clangd for autocompletebazel run //:copy_vscode_config_files
- A way to create launch VSCode configurations with correctly setsourceFileMap
settings. See.vscode/launch.json-tpl
This all works thanks to grailbio/bazel-compilation-database and zaucy/bzlws (a tool I made.) This repository was made for this discussion at bazelbuild/vscode-bazel.