titanium-sdk
titanium-sdk copied to clipboard
CLI: "console.*" functionality does not work as expected
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?
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:
- Android: https://github.com/appcelerator/titanium_mobile/blob/master/android/cli/hooks/run.js#L241-L314
- iOS: https://github.com/appcelerator/titanium_mobile/blob/master/iphone/cli/hooks/run.js#L63-L80