Compiling in other IDEs - musescore/MuseScore GitHub Wiki
Instructions assume you have already completed the required steps in:
- Set up developer environment
- Install Qt and Qt Creator
- Get MuseScore's source code
- Install dependencies
If you're a new developer, you should compile on the command line before you attempt to set up an IDE.
Qt Creator is a cross-platform IDE that comes with Qt and is specifically designed for building Qt software. For instructions, see Compile in Qt Creator.
The internal team uses Qt Creator, so you'll find it's better supported than the other options. Nevertheless, if you prefer to use a different IDE, feel free to add instructions for it below. Many contributors successfully and easily compile, run, and debug MuseScore Studio in Visual Studio (support is available on Discord).
Summary:
Your CMake profile for MuseScore is where you can make configuration changes. Create one for MuseScore, and deselect the "share" box so it doesn't bother you in other projects. Set the build type to Debug.
It is recommended under the Qt Creator guide to have a dummy install directory under your build. To do this in CLion, add -DCMAKE_INSTALL_PREFIX=$CMakeCurrentBuildDir$/install to the CMake Options field.
Under the run configurations menu (left of the green run arrow), click edit configurations. Create a new CMake application and choose a name for it (e.g. TestRun). Change the target to "All targets" (the topmost option in the dropdown).
Set the executable field to $CMakeCurrentBuildDir$/install/bin/mscore. Under "Before launch," remove the default build step and add the install step.
With the new run configuration, debugging should work as normal with CLion.
This guide shows how to build MuseScore on Windows using Visual Studio 2022/2026:
WARNING: There are known issues where one or more projects may fail to build on Windows due to some paths exceeding 255 characters even if you have long paths enabled. Usually these failures are in the tests projects and the MuseScoreStudio project builds fine which means you can ignore the failures. To avoid this, it is recommended to choose a folder for MuseScoreStudio as short as possible, e.g. C:\MuseScore rather than C:\<your_name>\development\MuseScoreStudio.
-
Prerequisites
- Install Visual Studio 2022/2026 with the Desktop development with C++ workload.
- Install CMake version ≥ 3.21 for VS 2022 and ≥ 4.2 for VS 2026.
- Install Git.
- Add Qt's
binfolder (e.g.C:\Tools\Qt\6.11.0\msvc2022_64\bindepending on where and which version of Qt you have) to your PATH environment variable.
-
Clone the repo
-
Optional: Disable CMake Presets in VS If you have Always use CMake Presets enabled, Visual Studio will ignore your
CMakeSettings.jsonand generate aCMakePresets.jsoninstead—so you won’t see the expectedmsvc.build_x64folder. To restore the default behavior:- In Visual Studio go to Tools → Options → CMake → General.
- Under CMake configuration file, select Never use CMake Presets.
- Reload your “Standard Build” configuration; you’ll again get the
msvc.build_x64folder.
-
Configure
mkdir build cd build cmake .. -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=RelWithDebInfo
- You can use any name you want for the build folder but don't make it long due to the possible long paths issue mentioned above.
- For VS 2026 use "Visual Studio 18 2026".
- Replace
RelWithDebInfowith another configuration (e.g.Debug) if you prefer. Keep in mind thatDebugruns really slowly.
-
Open & Build
- Double-click
MuseScore.sln(MuseScore.slnxfor VS 2026) in thebuildfolder to open the solution in Visual Studio. - Select the RelWithDebInfo configuration from the toolbar (or Debug if you went with
Debugabove). - Choose Build → Build Solution (or press Ctrl+Shift+B).
- Double-click
-
Run & Debug
- Press F5 to launch MuseScore under the debugger.
- Set breakpoints in C++ or QML and step through as needed.
Older instructions are here in the old Developer's Handbook. Feel free to transfer them to this page (omit anything covered in Prerequisites).
Within VS Code:
- Install VS Code extensions:
-
CMake Tools by Microsoft (for compilation & language support, e.g. syntax highlighting).
- Tip: Uninstall or disable any other CMake extensions, such as CMake by twxs.
- See YouTube video: Getting started with CMake Tools in Visual Studio Code.
- CodeLLDB by Vadim Chugunov (for debugging on macOS; maybe on other platforms too?)
-
CMake Tools by Microsoft (for compilation & language support, e.g. syntax highlighting).
- Go to File > Open Folder and select the MuseScore repo folder on your machine.
- Note: This folder is now the workspace in VS Code.
- Adapt these files and add them in a
.vscodefolder at the root of the workspace folder:- If you're unsure, ask an AI assistant to help adapt these files.
settings.json
tasks.json
{
"version": "2.0.0",
"tasks": [
{
"type": "cmake",
"label": "CMake: build and install",
"command": "build",
"targets": ["install"],
"group": { "kind": "build", "isDefault": true }
},
{
"label": "install",
"type": "shell",
"command": "cmake --install .",
"options": {
"cwd": "${command:cmake.buildDirectory}",
"env": { "PATH": "${env:HOME}/Qt/Tools/Ninja:${env:PATH}" }
},
"group": "build"
}
]
}launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "MuseScore Studio (installed)",
"type": "lldb",
"request": "launch",
"program": "${command:cmake.buildDirectory}/install/mscore.app/Contents/MacOS/mscore",
"cwd": "${workspaceFolder}",
"args": [
"-F",
],
"preLaunchTask": "install"
}
]
}Note: The above files provide a similar configuration to Compile in Qt Creator. If you keep the configurations identical, you can switch between the two IDEs, using the same build folder in each (just don't try to compile them simultaneously!). Or you can build to a different location if you prefer.
-
The CMake Tools extension added a CMake icon (🔼) in the left sidebar of VS Code. Click this icon to switch to the CMake view.
-
The left panel should show a Project Status tree. Expand the Configure section and select the first item inside it.
-
Click the pencil icon that appears next to this item to choose a suitable build kit (e.g.
Apple clang, Qt 6.10.2). -
Click Build in the status bar at the bottom of the screen. The app should start to compile.
-
When it's done, click the Run and Debug icon (🪲
▶️ ) in the left sidebar, then start debugging the MuseScore Studio (installed) target.
Instructions are here in the old Developer's Handbook. Feel free to transfer them to this page (omit anything covered in Prerequisites).
{ "cmake.sourceDirectory": "${workspaceFolder}", "cmake.buildDirectory": "${workspaceFolder}/builds/Qt_6_10_2_for_macOS-Debug", "cmake.generator": "Ninja", "cmake.configureOnOpen": false, "cmake.buildTask": true, // True makes the Build button run the default task from tasks.json instead of the selected target. "cmake.copyCompileCommands": null, "cmake.useCMakePresets": "never", "cmake.buildEnvironment": { "PATH": "${env:HOME}/Qt/Tools/Ninja:${env:PATH}" }, "cmake.configureEnvironment": { "PATH": "${env:HOME}/Qt/Tools/Ninja:${env:PATH}" }, // These repeat the values already in Qt Creator's CMakeCache.txt, so no reconfigure is forced. "cmake.configureSettings": { "CMAKE_PREFIX_PATH": "${env:HOME}/Qt/6.10.2/macos", "CMAKE_MAKE_PROGRAM": "${env:HOME}/Qt/Tools/Ninja/ninja", "CMAKE_INSTALL_PREFIX": "${workspaceFolder}/builds/Qt_6_10_2_for_macOS-Debug/install", // "MUE_BUILD_MACOS_INTEGRATION": "OFF" // Uncomment if building on macOS without a full Xcode installation. }, "C_Cpp.default.compileCommands": "${workspaceFolder}/builds/Qt_6_10_2_for_macOS-Debug/compile_commands.json" }