Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing console.dump on ios... #805

Closed
enchev opened this issue Sep 23, 2015 · 6 comments
Closed

Missing console.dump on ios... #805

enchev opened this issue Sep 23, 2015 · 6 comments
Assignees
Milestone

Comments

@enchev
Copy link
Contributor

enchev commented Sep 23, 2015

From @enchev on September 23, 2015 6:36

From @NathanaelA on September 19, 2015 8:6

I copied some code over from Android to ios; and found out the console.dump doesn't work. Shouldn't we take the same dump routine that is available on the ios and patch the console prototype to use it?

Copied from original issue: #778

Copied from original issue: NativeScript/ios-jsc#326

@enchev
Copy link
Contributor Author

enchev commented Sep 23, 2015

From @jasssonpet on September 23, 2015 7:53

console.dump() isn't implemented in any of the following popular APIs:

IMO, if we want to support it on iOS, the same as we do on Android, we have to add the same implementation from the modules in the runtime, which is suboptimal and error-prone. I think, that the dump method (and any other custom one) should be added in the NativeScript modules, so that it can work the same on iOS and Android.

IMO, instead of modifying internal JavaScript objects we should replace the console.dump(obj) method with console.log(f(obj)), where f is something like util.inspect() in node.

Related to: NativeScript/ios-jsc#261

@NathanaelA

This comment was marked as abuse.

@valentinstoychev
Copy link

@NathanaelA - consistency is a major concern here and it is with biggest priority for us, so we will make sure to fix this. cc: @atanasovg

@emiloberg
Copy link

One of the first thing I do, no matter if it's a {N} project or a Node project, is that I add eyes.js for outputing stuff. Colorized and nice formatted. I could definitely see this being a core part of {N}.

Footnote:
Unfortunately eyes asks for process.stdout. To make it work in a {N} context you've to change Line 34 from stream: process.stdout, to stream: null.

@enchev enchev added the done label Sep 24, 2015
@enchev
Copy link
Contributor Author

enchev commented Sep 24, 2015

I've just merged to master console.dump for iOS and I'm closing this.

@enchev enchev closed this as completed Sep 24, 2015
@lock
Copy link

lock bot commented Aug 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Aug 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants