Skip to content

Missing console.dump on ios... #805

Closed

Description

@enchev

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

Activity

  1. enchev commented on Sep 23, 2015

    @enchev
    ContributorAuthor

    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

  2. self-assigned this
    on Sep 23, 2015
  3. added this to the 1.4.0 milestone on Sep 23, 2015
  4. NathanaelA commented on Sep 23, 2015

    @NathanaelA
  5. valentinstoychev commented on Sep 23, 2015

    @valentinstoychev

    @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

  6. emiloberg commented on Sep 23, 2015

    @emiloberg

    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.

  7. enchev commented on Sep 24, 2015

    @enchev
    ContributorAuthor

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

  8. lock commented on Aug 30, 2019

    @lock

    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.

  9. locked and limited conversation to collaborators on Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions