🍨 A XMake integration in IntelliJ IDEA

ruki 65960599b4 fix select arch 2 weeks ago
.github 703ea931f5 add verify.sh 1 month ago
clion-debug b08a1e8b88 check gdb support 4 weeks ago
gradle 5da2f6a046 Update gradlew 2 months ago
res 0deba2e508 fix res 4 years ago
src 65960599b4 fix select arch 2 weeks ago
.gitattributes 5da2f6a046 Update gradlew 2 months ago
.gitignore 5c547be298 fix jar path 1 month ago
CONTRIBUTING.md 1174209cca update xmake github url 7 years ago
LICENSE.md cb5ef043dd add readme 8 years ago
README.md 00358d0fa2 update readme 1 month ago
build.gradle.kts 5c547be298 fix jar path 1 month ago
build.sh e03164738d fix build 1 month ago
change-notes.html 65960599b4 fix select arch 2 weeks ago
description.html adbc2934d1 cleanup code and fix 2 years ago
gradle.properties 65960599b4 fix select arch 2 weeks ago
gradlew 5da2f6a046 Update gradlew 2 months ago
gradlew.bat 5da2f6a046 Update gradlew 2 months ago
run.sh e03164738d fix build 1 month ago
settings.gradle.kts 8710813ebe move debug to jar 1 month ago
verify.sh 703ea931f5 add verify.sh 1 month ago

README.md

xmake-idea

A XMake integration in IntelliJ IDEA

Introduction

A Xmake integration in IntelliJ IDEA/Clion.

It is deeply integrated with xmake and Intellij-IDEA to provide a convenient and fast cross-platform c/c++ development and building.

And It also support other Intellij-based platform, like Clion, Android Studio and etc.

You need install xmake first and a project with xmake.lua.

Please see xmake-github and website if you want to known more about xmake.

Features

  • Quickstart
  • Create project
  • Project configuration
  • Run configuration
  • Menu tools
  • Tool windows
  • Build and run
  • Parse errors and goto file
  • C/C++ intellisense
  • Debug

Quickstart

Parse errors and goto file

Output panel

Create project

Project configuration

You can configure Xmake path, build settings, and Intellisense options in Settings > Build, Execution, Deployment > Xmake.

Run configuration

Menu tools

C/C++ intellisense

Only support CLion (>= 2020.1)

  1. The plugin generates compile_commands.json for project code completion and navigation.
  2. You can configure the output path and auto-update behavior in Settings > Build, Execution, Deployment > Xmake.
  3. To manually generate it, click Update compile commands in the main menu or context menu.
  4. CLion should automatically detect compile_commands.json. If not, you can open it via File > Open....

Debug

DAP Debugging (Recommended)

Only support CLion (>= 2025.3)

XMake now supports native debugging via the Debug Adapter Protocol (DAP). This allows you to debug your XMake targets directly without generating CMakeLists.txt.

  1. Install lldb-dap (recommended) or gdb-dap on your system.
  2. Open the "Run Configuration" for your XMake target.
  3. In the "Debug Configuration" section, you can:
    • Enable "Auto-detect DAP driver" to let the plugin find the driver automatically.
    • Or manually select/input the path to your DAP driver executable (e.g., /usr/bin/lldb-dap).
  4. Click the Debug button to start debugging.

Legacy Debugging (CMake)

Support CLion (>= 2020.1)

  1. Click "Update CmakeLists" to create or update "CmakeLists.txt" file.
  2. Click "File > open..." to choose this file.
  3. Choose "Run > Debug..." or "Run > Debug 'project name'" into debug mode.

How to contribute?

Due to limited personal time, I cannot maintain this plug-in all the time. If you encounter problems, you are welcome to download the plug-in source code to debug it yourself and open pr to contribute.

Build this project

Use IDEA Intellji open this project source code, and click Build button.

Run and debug this project

Open and edit Run configuration, and add a gradle run configuration, then write run arguments: runIde --stacktrace and save it.

Select this run configuration and click run button to load it.

For more details, please visit: CONTRIBUTING

Powered by

JetBrains logo.