While I'm not sure why console
object isn't supported in qbs (still stuck in qmake land myself), you can get console output with print
:
print("Hello!");
This works in console, but not in Qt Creator, yet. This will be resolved in qbs 1.5, but it isn't released yet at the time of writing this, as pointed out by @JakePetroules. The relevant, resolved bug report is here.
For older versions, it seems you just have to either throw "Hello!";
(which makes the build fail), or run qbs from command line when debugging the project building (the used command can be conveniently copied from Qt Creator Projects view).
As to why Qt Creator autocompletion shows it, it'll hazard a guess: it might because console
is hard-coded into its Javascript auto-completion as a core Javascript feature which is always available. Might be worth writing a bug report!