Best Practices for writing and debugging plugins
Hello,
What tools do you use to write and debug plugins for musescore 4.x ?
I'm using notepad, but I can't see the output written to the console, making it hard to debug.
For now, I returned to musescore 3 so that I can use the plugin creator.
Thanks,
Luc.
Comments
You can send debug info to an output file, but this is even more tedious than console.log.
miniReadWrite.qml
In reply to You can send debug info to… by elsewhere
Hi,
Does this redirect error messages, or messages not generated by an explicite debug command to an output file as well?
Thanks,
Luc.
In reply to Hi, Does this redirect error… by lucvdv
No, no. You have to expicitly construct consolelog like messages, e.g.
s = mergetick[j] + "\t" + mergenote[j] + "\t" + mergechord[j] + "\t" + mergecol[j]
output += s + "\n";
EDIT Another useful trick to leave the plugin at a particular place is:
throw new Error("message");
In reply to No, no. You have to… by elsewhere
Yes, that's what I thought. So where do the implicit error messages go to? I don't find a musescore errorlog file.
I understand that there are other priorities than implementing the plugin editor for MS4 and I respect that choice.
I also think that the importance of the plugin creator is underestimated.
Thanks,
Luc.
In reply to Yes, that's what I thought… by lucvdv
Using a nightly and start on command line with -d switch, will show error messages
In reply to Yes, that's what I thought… by lucvdv
See https://musescore.org/en/node/345455 re. logfile