![]() Exclude at first the following folders and manually include the ones relevant to you. Open the actions menu and enter create command-line launcherĮxclude irrelevant folders from indexing to speed up CLionĮxclude folders that are irrelevant to your work from the indexing.Type create desktop entry and press enter.To make it easier to startup CLion or open individual files: Optional Steps Create terminal cli or desktop entry To expedite this process, see the section Exclude irrelevant folders from indexing to speed up CLion below. To remove some errors, these flags can be added in src/out/Default/args.gn: enable_nocompile_tests=trueĬLion will start processing the files and will start indexing the symbols. It’s simply because some files are not compiled. Note: This step will produce a few hundred errors but it doesn‘t cause any issues. In CLion, select the compile_commands.json file in the project navigator, right-click on it, then click on Load Compilation Database Project. This generates the compilation database at chromium/compile_commands.json. Run from your chromium folder: python3 src/tools/clang/scripts/generate_compdb.py -p src/out/Default -o. To go from approach 1 to 2, the CMakeWorkspace line from. Note: The two approaches are not currently compatible and switching between one and the other is cumbersome. In the Chromium code source, there’s a python script src/tools/clang/scripts/generate_compdb.py that will generate the Compilation Database. Since Chromium does not use CMake to build, to “benefit from the advanced IDE features that CLion provides”, a Compilation database must be created to expose to CLion how Chromium is built. # to provide code completion, navigation, etc.Īdd_executable(chromium src/components/omnibox/browser/document_) Leaving at least 1 file is required in order for CLion # The following file used is irrelevant, it's only to improve CLion Include_directories($/src/third_party/abseil-cpp) Add or Replace the content with: cmake_minimum_required(VERSION 3.10).Create or Modify the chromium/CMakeLists.txt file.Note: It's possible that when you open the project, CLion created one for you. Run > Run ( shift+f10) or Run > Debug ( shift+f9) (screenshot) Autocompletion Approach 1: Using CMakeLists You can now run chrome directly from CLion. It seems that using that CLion's bundled gdb executable is the culprit. There have been some reports of slowness while debugging using CLion. Open it with a text editor and enter: source /src/tools/gdb/gdbinit ) and select src/out/Default/chromeīefore being able to debug, you need to configure ~/.gdbinit. Target: Select the Default build target that was created previously.Click on the + sign then on Custom Build Application.Click on the Run menu and then on Edit Configurations.The build target configured in the previous section was necessary to configure the Run/Debug configuration. Next to Build, click on the three dots (.Click on the + sign to add a new build target.Then, to Build, Execution, Deployment > Custom Build Targets. ![]() The first step is to add Ninja (specifically autoninja) as an external tool that will be used to create the build targets. Selecting src instead would result in some CLion IDE files appearing in your repository.īuilding, Running, and Debugging within CLionĬonfigure CLion to use ninja for building (see Linux Build Instructions) Custom Build TargetsĪ custom Build Target allows CLion to compile Chromium similarly to running ninja in the command line. At the startup dialog, select Import Project and select your chromium directory this should be the parent directory to src.Optand prior versions may not include the options to setup your VM Options and Properties in the configure menu.Add or replace the following flags (to learn more: Platform Properties | IntelliJ IDEA): =12500.Again, at the startup dialogue, in the bottom left corner, click on the Cog icon and then click on Edit Custom Properties:.Close the Edit Custom VM Options dialog.Add or replace the following flags (to learn more: Advanced configuration | IntelliJ IDEA): -Xss2m In the textbox, you will see different flags.At the startup dialog, in the bottom left corner, click on the Cog icon and then click on Edit Custom VM Options:.This step will help performance with large projects Googlers only: See go/intellij-getting-started for installation and license authentication instructions.Exclude irrelevant folders from indexing to speed up CLion.Building, Running, and Debugging within CLion. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |