Skip to content

node 5.5: util.format on object crahes debugger #4952

Description

@thomas-mindruptive

node 5.5, windows 8.1

Following code crashes the debugger (it exits the app on "util.format" without an error message).

var util = require("util");
var obj = { 1: "fasdadsaas", 2: "safsdafdsafsadfad" };
var message = util.format("Format the object: %O", obj);
var i = 1;

Reproducible through "node debug formatBug.js", as well as node-inspector and Visual Studio Code.

For us it's quite severe because we are logging to the console extensively during development. "console.log" uses "util.format" and therefore crashes the debugger.

Thanks
mind

Activity

  1. added
    utilIssues and PRs related to the built-in util module.
    on Jan 29, 2016
  2. MylesBorins commented on Jan 29, 2016

    @MylesBorins
    Contributor

    @mindruptive I have a patch in that should fix this although we are just trying to get a working test for it. I'm hoping I can get this working today.

    #4819

  3. thomas-mindruptive commented on Jan 31, 2016

    @thomas-mindruptive
    Author

    Thanks a lot for the fast response.
    Best
    mind

  4. thomas-mindruptive commented on Jan 31, 2016

    @thomas-mindruptive
    Author

    P.S.: For the moment, I'm using following work around: I'm replacing the various "console.log" functions by my own. They simply tunnel/send the log statements to a chrome browser through web sockets. That's good enough for the moment and makes the log output easily readable.
    Best
    Thomas

  5. 8 remaining items

  6. MylesBorins commented on Feb 5, 2016

    @MylesBorins
    Contributor

    The fix is now in master, you should expect this to see it in a release in the next 2 - 3 weeks on v4 and v5.

  7. thomas-mindruptive commented on Feb 7, 2016

    @thomas-mindruptive
    Author

    thanks,
    best mind

  8. MylesBorins commented on Feb 9, 2016

    @MylesBorins
    Contributor

    The fix is now released in v5.6.0. Expect LTS next week

  9. MylesBorins commented on Feb 17, 2016

    @MylesBorins
    Contributor

    The fix is now in lts on v4.3.1 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    utilIssues and PRs related to the built-in util module.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions