Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Debugger crashes when attempting autocomplete on yet-to-be-required object #8359

@sarathms

Description

@sarathms

Scenario: While debugging attempted to use util.inspect(). But instead of requiring into a var and then calling the inspect method, tried performing a require('util').inspect(obj). Crash with below stack trace.

> require('util').inspThere was an internal error in Node's debugger. Please report this bug.
Object.keys called on non-object
TypeError: Object.keys called on non-object
    at Function.keys (native)
    at REPLServer.complete (repl.js:449:23)
    at Interface.complete [as completer] (repl.js:152:10)
    at Interface._tabComplete (readline.js:359:8)
    at Interface._ttyWrite (readline.js:779:14)
    at ReadStream.onkeypress (readline.js:99:10)
    at ReadStream.emit (events.js:98:17)
    at emitKey (readline.js:1095:12)
    at ReadStream.onData (readline.js:840:14)
    at ReadStream.emit (events.js:95:17)

I'm on Ubuntu 12.04

$ uname -srvmpio
Linux 3.8.0-34-generic #49~precise1-Ubuntu SMP Wed Nov 13 18:05:00 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

$ node
> process.versions
{ http_parser: '1.0',
  node: '0.10.31',
  v8: '3.14.5.9',
  ares: '1.9.0-DEV',
  uv: '0.10.28',
  zlib: '1.2.3',
  modules: '11',
  openssl: '1.0.1i' }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions