0

[vscode] Add tips about multiple Git repositories

When using VS Code and working in multiple Git repositories that are
part of the Chromium repository, if 'src' is the only entry, or listed
first in the workspace configuration, the additional directories are
ignored because of .gitignore entries.

This CL adds a tip for how to work around this, by listing individual
directories that you are editing before in the 'folders' entry in the
workspace configuration file.

Bug: None
Change-Id: If793da9831af567872ca4c7f450385fd8841dbe6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2762098
Auto-Submit: Tommy Nyquist <nyquist@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#862937}
This commit is contained in:
Tommy Nyquist
2021-03-15 20:29:04 +00:00
committed by Chromium LUCI CQ
parent 6b2fc62b02
commit dc2ceaa49b

@ -383,6 +383,26 @@ You might want to disable git status autorefresh to save battery.
"git.autorefresh": false,
```
#### Editing in multiple Git repositories
If you frequently work in multiple Git repositories that are part of the Chromium repository, you might find that the built-in tooling does not work as expected for files that exist below folders that are part of a `.gitignore` file checked in to Chromium.
To work around this, you can add the directories you edit as separate `folders` entries in your workspace configuration, and ensure that the directories that are ignored in Chromium are listed **before** the Chromium `src` path.
To edit this, go to `Settings` -> Select the `Workspace` tab, and choose to open as JSON (button in the top right), and configure `folders` like this (change paths to match your local setup and usage):
```
{
"folders": [
{
"path": "chromium/src/third_party/perfetto"
},
{
"path": "chromium/src"
}
]
}
```
### Unable to open $File resource is not available when debugging Chromium on Linux
Chromium [recently changed](https://docs.google.com/document/d/1OX4jY_bOCeNK7PNjVRuBQE9s6BQKS8XRNWGK8FEyh-E/edit?usp=sharing)
the file path to be relative to the output dir. Check