Script Debugger - User Feedback ( console.log() )
I have started to develop a small plugin and I am wondering, if it is possible to print feedback to the console in the debugger. I would like to output some variable values during the execution of a loop in the plugin.
In the internet I find the
console.log(...) and
alert(...)
commands, but they don't work.
I also tried to add
Import QtQuick 1.0
statement in the beginning of my script, but this gives me an error.
Can you help me on this?
Thanks a lot
HarmonicaJack
Comments
Try "import QtQuick 2.x" (2.0 should work) (small case "i" in import statement).
console.log(...) should work.
In reply to Try "import QtQuick 2.x" (2.0 by jensm
and look at the existing examples that are part of MuseScore
In reply to Try "import QtQuick 2.x" (2.0 by jensm
Hi jensm, thanks for your answer.
Unfortunately this does not work, and it seems to have to do with the file name.
I am writing a .js file.
I found .qml files, where those import statements are used, but they seem to be a different kind of script and when I put such a file into the plugin folder, I cannot see it in the plugin menue.
Is there any other way to send messages for debugging to some kind of console or to make a popup in a .js file?
Regarding the qml file:
Is there a simple "how to" explanation for working with qml files?
From the internet I found that they are some kind of Qt dialog.
Currently I am fine with the js scripts, but my feeling tells me that I will need to understand those qml files, if I want to have user interaction.
Kind regards
HarmonicaJack
In reply to Hi jensm, thanks for your by HarmonicaJack
MuseScore no longer supports .js, period. All plugins are .qml. See the existing plugins that are shipped with MuseScore, and the online help within the plugin creator, for the "how to", such as it is.