This repository has been archived by the owner on Feb 1, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Make autocompletion in REPL work
There was a bug in `internal/inspect_repl.js` that caused REPL to crash when trying to invoke autocomplete. Steps to reproduce: * Start the debugger. * Run `repl` command. * Type any letter. * Press <Tab>. * Debugger crashes with `TypeError: elem.indexOf is not a function`. The reason is that Node's REPL expects a completion group to be an array of strings while node-inspect passed an instance of ScopeSnapshot. This commit fixes it by adding completion groups for REPL as properties of ScopeSnapshot instances and returning them when evaluating ".scope".
- Loading branch information