Where are MS4 plugin runtime errors seen?

• May 18, 2025 - 21:27

Developing a plugin in MS4 is proving to be quite a slow, iterative process because there doesn't appear to be any console output, so something like a simple syntax error, (a missed quote, comma or semicolon), results in a blank dialog window at runtime and no clue as to what or where the error might be.

Is this information available anywhere?

Here's an example of iterations made within a single 30 minute period on my ImportVelocity plugin:

ImportVelocity.png

I wipe out the files every 10 iterations so that this list doesn't get too long. As I said, it's proving to be a slow process.

System: MS4.5.1 on Windows 11 using Notepad++ as editor.


Comments

In reply to by TheHutch

As above, I would suggest using a window with a text area.

I do this:

Debug1.png

Debug2.png

Where:
zLog is a property var true/false to say whether debug logging is on of off.
info is any text string or expression to pass to the log
zclr is true/false to control whether the new text string should clear the window first
iTab is the indentation level which I change by +/- 4 when I require an indent change
logText is the text contents of the window

Here's an example of the output:

Debug3.png

In reply to by Jojo-Schmitz

Re: Jojo-Schmitz • May 18, 2025 - 21:37
Check the logs in C:\Users\YOURNAME\AppData\Local\MuseScore\MuseScore4\logs


OK, it's quite busy but very handy.
Has already saved me a couple of iterations by spotting a syntax error.

If I can give a piece of advice, it doesn't seem like a good idea to develop a plugin in MS4. In the case of 'properties' with a different name, nothing prevents you from developing the plugin with MS3.6.2, changing what needs to be changed to the finished 'product'. Consulting log files is certainly useful when there is no alternative, but it is an unbearably slow mechanism.

Do you still have an unanswered question? Please log in first to post your question.