tidev / titanium-sdk

🚀 Native iOS and Android Apps with JavaScript
https://titaniumsdk.com/
Other
2.76k stars 1.21k forks source link

CLI: "console.*" functionality does not work as expected #12453

Open jasonkneen opened 3 years ago

jasonkneen commented 3 years ago

Console is supposed to support .group capabilties according to the documentation but this doesn't work in practice.

console.group("URL Details");
console.log("Scheme: HTTPS");
console.log("Host: example.com");
console.groupEnd();

Should render the two items in a group (indented)

Can this functionality be implemented or the docs updated to remove it?

sgtcoolguy commented 3 years ago

It actually is implemented at the console level here: https://github.com/appcelerator/titanium_mobile/blob/master/common/Resources/ti.internal/extensions/js/console.js#L74-L83

The issue is in the CLI hooks that print the logs to the terminal/shell - they do some trimming of the output: