On Tue, Dec 12, 2017 at 7:23 AM, Mark Constable <ma...@renta.net> wrote: > I hope it's okay to ask a lame question about simply enabling debug > output to the launching shell from a plasmoid via kpackagelauncherqml. > My desktop is Ubuntu bionic with kubuntu-ci/stable packages and I am > following the first example here... > > https://community.kde.org/Plasma/DeveloperGuide#An_App_in_5_Easy_Steps > > In my copy of plasma-framework/examples/developerguide/basic which > has been installed and then launched with kpackagelauncherqml... > > // This message will end up being printed to the terminal > //print("Color is now " + colorRect.color); > console.log("Color is now " + colorRect.color); > > the above 2 lines do not output anything to the current shell and no > other example I've tried as a simple QML script (either via qtcreator > or just qmlscene) will output any debug info to any associated shell. > > I've tried the below and fiddling with various qtcreator settings... > > QT_QML_DEBUG=1 kpackagelauncherqml -a org.example.myplasmoid > QT_LOGGING_TO_CONSOLE=1 kpackagelauncherqml -a org.example.myplasmoid > > I have both Qt 5.9.2 installed by the OS and Qt 5.10 in my ~/Qt folder. > > Any suggestion on how to get console output from a plasmoid?
That's because some distributions change stuff so debug information don't show up on the users' systems. A quick fix is to use console.warn(). `export QT_LOGGING_RULES="*.debug=true" ` should also do. Aleix