CLion is an IDE
Prerequisite: Checking out and building the chromium code base
Install CLion
Run CLion
Increase CLion's memory allocation
This step will help performance with large projects
ConfigureEdit Custom VM Options:-Xss2m -Xms1g -Xmx10g ...
Edit Custom Properties:idea.max.intellisense.filesize=12500
VM Options and Properties in the configure menu. Instead:Create New ProjectHelp > Edit Custom VM OptionsHelp > Edit Custom PropertiesImport Project and select your chromium directory; this should be the parent directory to src. Selecting src instead would result in some CLion IDE files appearing in your repository.CMakeLists.txt fileCMakeLists.txt fileinclude_directories with the following. This will help with navigating between files.include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
add_executable files to include a single file. Doing this might improve CLion performance. Leaving at least 1 file is required in order for CLion to provide code completion, navigation, etc. The file should now look like:cmake_minimum_required(VERSION 3.10)
project(chromium)
set(CMAKE_CXX_STANDARD 14)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
add_executable(chromium src/components/omnibox/browser/document_provider.cc)
custom build targets settingsctrl+shift+a > custom build targets+ button to create a new target.... button next to the Build field+ button in the new panelProgram: <absolute path to depot_tools/ninja> Arguments: -C src/out/Default -j 1000 chrome
Run > Edit Configurations+ in the top left and select Custom Build ApplicationTarget field to one of the targets configured in step 1option for theExecutablefield and select the chrome build e.g.out/Default/chrome`out/Debug but execute out/Default/chrome.Run > Run (shift+f10) or Run > Debug (shift+f9) (screenshot) To make it easier to startup CLion or open individual files:
ctrl+shift+a)create desktop entry and press entercreate command-line launcherLibrary FilesTo speed up CLion, optionally mark directories such as src/third_party as Library Files
Project navigation (alt+1)Mark directory as > Library Fileshttps://blog.jetbrains.com/clion/2015/12/mark-dir-as/ for more details