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

debugger: use requireRepl() to load debugger repl #8784

Closed
wants to merge 1 commit into from
Closed

debugger: use requireRepl() to load debugger repl #8784

wants to merge 1 commit into from

Conversation

cjihrig
Copy link

@cjihrig cjihrig commented Nov 26, 2014

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.

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

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']);
});

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?

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.

@misterdjules
Copy link

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.

@cjihrig cjihrig modified the milestones: v0.12, 0.11.16, 0.12.1 Jan 30, 2015
@cjihrig
Copy link
Author

cjihrig commented Feb 2, 2015

@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?

@misterdjules misterdjules modified the milestones: 0.12.3, 0.12.2 Apr 1, 2015
@misterdjules misterdjules modified the milestones: 0.12.3, 0.12.4 May 14, 2015
@misterdjules misterdjules modified the milestones: 0.12.4, 0.12.5 May 25, 2015
@misterdjules misterdjules modified the milestones: 0.12.5, 0.12.6 Jun 22, 2015
@misterdjules misterdjules modified the milestones: 0.12.6, 0.12.7 Jul 6, 2015
@misterdjules misterdjules modified the milestones: 0.12.7, 0.12.8 Jul 10, 2015
@jasnell
Copy link
Member

jasnell commented Aug 27, 2015

@cjihrig ... what would you like to do with this one?

@cjihrig
Copy link
Author

cjihrig commented Aug 27, 2015

This also landed in the converged repo.

@cjihrig cjihrig closed this Aug 27, 2015
@cjihrig cjihrig deleted the 8359 branch August 27, 2015 17:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants