MuseScore 3 debug mode script and score for OSX
While working with MuseScore 3 plugin development, I made a simple debug mode script and score for OSX to make things slightly easier. Once installed, you:
a) run the script in an OSX command line shell (which starts Musescore 3 in debug mode) and opens your plugin test score plugin_debugger.mscz.
b) run your plugins against the provided debugging score plugin_debugger.mscz - this score is where you will see the results of your test plugin.
c) as you work on your plugin, watch the terminal for debugging info (where textual debug information will appear).
This tutorial assumes you know the basics of using the OSX command shell in a terminal window, but other than that, it's pretty straightforward.
You'll need to reload your plugins (see setup item 3 below) each time you edit your plugin
.qml file so that MuseScore captures the most recent version of your plugin code.
To set things up:
|1||Download and save the musescore3_debug.txt* command line script file - renaming the suffix to something like
|2||Download and save the debug score plugin_debugger.mscz*|
* (Important: File save location: I've used the default
./Plugins directory to store both these files: if you save them elsewhere, you'll need to update the script so it can find the score file location to open via the script's
-f plugin_debugger.mscz parameter. It makes sense to keep these two files together in a single directory, so you're clear on the effects of your plugin).
To use the files:
|1||In an OSX command shell, call the debugging script you just made (just enter the script file name - assuming you
|2||The debugging score file plugin_debugger.mscz also contains some basic references/instructions useful for debugging your
|3||Don't forget to reload your plugins in MuseScore after any change to the plugin code, so MuseScore picks up the latest version. Do this by clicking 'Plugins - Plugin Manager - Reload plugins'.|
I'd be happy to incorporate anyone's suggestions on how to make this process easier or more useful - send me a PM.