breadcrumbs:
Here is an incomplete stack of tricks to help you work with Chromium in Visual Studio.
Loading a huge solution (like all.sln as generated by gn) makes Visual Studio very slow, and certain operations like IntelliSense can be somewhat unusable. Some tips for speeding it up:
gn gen --ide=vs --filters=//components/omnibox/\* --sln=omnibox out/Debug will only create projects for components/omnibox/ and its dependencies. However, be aware that Code Search (see below) will not work on code that’s been filtered out!After opening the solution, give Visual Studio about 10-15 minutes to finish parsing files etc; it'll become more responsive after that.
The VsChromium extension provides fast code search, among other useful features. Code from unloaded solutions (via VsFunnel, see above) is still searchable!
You can set up column guidelines at 80 columns or wherever you would like by installing this Visual Studio extension and using the context menu options.
Once you've installed the extension, you can automatically add guidelines at the style-guide-specified line length limits for all Chromium languages as well as commit messages by downloading this .editorconfig file and placing it in the parent of your src/ checkout -- that is, the directory with your .gclient file in it. This will also set indenting size/style and other similar style defaults for Chromium. For more information on EditorConfig files, see here.
cpplint.py integration makes it easy to check that a source file conforms to the style guide. To do this, just go to Tools > External Tools > Add. Specify:
To create a keyboard shortcut:
Or, make the title something like c&pplint.py, and invoke it with Alt+t,p.
The style guide requires no tabs and 2 char indentation. If you have copied in the .editorconfig file mentioned above, you should get this automatically (but only for files inside src/). If not, or to set this globally, go to Tools > Options. On the Text Editor/All languages/Tabs page, set
See https://www.chromium.org/developers/how-tos/how-to-set-up-visual-studio-debugger-visualizers.