-
Notifications
You must be signed in to change notification settings - Fork 7.3k
debugger: use requireRepl() to load debugger repl #8784
Conversation
Currently, the debugger uses require('repl') to setup the repl. However, require.extensions is not available yet, causing a crash on tab completion of require('. This commit uses the module.requireRepl() method to bootstrap the repl.
@@ -211,3 +211,18 @@ testMe.complete(' ', function(error, data) { | |||
testMe.complete('toSt', function(error, data) { | |||
assert.deepEqual(data, [['toString'], 'toSt']); | |||
}); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these newly added tests actually test the bug that this PR fixes? It seems these tests don’t involve the debugger, so they seem not to be regression tests for this issue, or am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, I hadn't seen the second part of the commit message, sorry.
Before landing this change, I'd actually like to see if we can create a test that can run automatically within the context of the debugger, and that could thus be part of the tests suite. |
@misterdjules here is the problem I'm running into. The tab autocomplete only appears to be activated when stdout is a tty. When I spawn the child process with a tty stream as stdout, I can't capture the output to validate it (although I can see it, and it is correct). Any suggestions? |
@cjihrig ... what would you like to do with this one? |
This also landed in the converged repo. |
Currently, the debugger uses
require('repl')
to setup the repl. However,require.extensions
is not available yet, causing a crash on tab completion ofrequire('
. This commit uses themodule.requireRepl()
method to bootstrap the repl.Also added a test for
require('
tab completion in the repl module. Creating a test for tab completion with the debugger running is proving to be a bit painful.Closes #8359