Using the console log output (very basic question)
I had liked to try programming simple tasks in Musescore using the plugins capability.
Unfortunately, I already fail on a "Hello world" test.
Running the example here below, I very briefly see a window but it immediately disappears.
If I add "wait (2000);" before Qt.quit(), the window remains visible, but it is empty.
Also, it remains visible forever while the wait should have only lasted 2000ms.
I probably miss some very basic information about how a Musescore plugin can output messages.
Looking at the provided examples, I found another way using a "rectangle" definition with a text property.
This works fine.
However, it does not tell me what happens with the "console log" instructions.
There are such instructions in all provided examples, so there must be a way to see the log.
Thank you in advance for your support.
Roger
//----------------------------------------------------
import QtQuick 2.0
import MuseScore 3.0
MuseScore {
version: "3.0"
description: qsTr("Test console log")
pluginType: "dialog"
menuPath: "Plugins.Test"
onRun: {
console.log("Test OK");
Qt.quit();
}
}
//----------------------------------------------------
Comments
When you run your plugin from the Plugin Creator inside MuseScore, it'll show the console.log messages in its bottom pane.
In reply to When you run your plugin… by jeetee
Thank you jeetee, this is exactly the bit that I had missed !
In reply to Thank you jeetee, this is… by Flying Roger
It is also so that if you invoke MuseScore from the command line, they actually appear there (among many other surprising outputs), but this is of little value when debugging plugins.
In reply to It is also so that if you… by [DELETED] 1831606
Not on Windows though