Don't see console.log output
Hi, I'm trying to run a hello world plugin but don't see any console output. I'm checking in the %LOCALAPPDATA%\MuseScore\MuseScore4\logs directory.
This is the onRun code I'm trying:
onRun: {
console.log("Hello World!");
quit();
}
And this is the output I see in the latest file from the logs directory (my plugin is called "FLMScore"):
2024-03-07T22:11:02.678 | INFO | main_thread | ActionsDispatcher::dispatch | try call action: FLMScore
No "Hello World!" message.
Should I be looking somewhere else to see the effects of console.log?
Thanks for any help!
Comments
See https://musescore.org/en/node/345455
AFAIK MU4 does not have the plugin Creator window of MU3.6
In reply to See https://musescore.org/en… by elsewhere
Thanks for the link - do you know if there's any commonly used workaround for MU4 logging, ex. writing to a file instead of printing to console?
In reply to Thanks for the link - do you… by amac_26629
In MU3.6 you can send output to a file (see MiniOutput.qml), but I don't know if this works in MU4, and that is more tedious and limited than console.log already is..
Always check https://musescore.org/en/plugins?category=All&compatibility=All for this kind of question.
There I found:
https://musescore.org/en/project/debugtools-using-log-file-debug-plugins
But I have not used it myself...
In reply to In MU3.6 you can send output… by elsewhere
Thanks for the tip, it looks promising.
In reply to Thank you so much for the… by WilliamTownsend
Jesus, worse self promotion I've ever seen in my life
In reply to Jesus, worse self promotion… by hetlesaethers
Never reply to spam (which is now deleted)
I got basic file writing working after looking over some sample scripts. I don't think it's worth officially uploading my plugin in its current state, but I'll paste the "Hello World!" code here for anybody who stumble across this thread in the future: