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

Repl in node debug can only be exited using ctrl-c #5631

Closed
srathbun opened this issue Jun 4, 2013 · 4 comments
Closed

Repl in node debug can only be exited using ctrl-c #5631

srathbun opened this issue Jun 4, 2013 · 4 comments

Comments

@srathbun
Copy link

srathbun commented Jun 4, 2013

Node debug allows you to drop into a repl at your current location using the repl command. To exit this, the only allowed method is to use ctrl-c since .exit does not work. As shown here, the repl listens to SIGINT, but sending it a sigint with kill, breaks the debugger.

I'm not sure, but digging into the repl source seems to indicate that it only pays attention to SIGINT from the attached terminal, instead of in general. This is a problem if the debugger is a child process of a script, and SIGINT on the script causes an exit.

If .exit acted the same as ctrl-c during debugging, this problem would be solved.

@TooTallNate
Copy link

Looks like we should be using the repl's exit event there instead of the readline instance's SIGINT event... I'll try to whip up a patch.

@sideshowcoder
Copy link

This has been present for quite some time now, and I just ran into typing exit a couple of times again. Is their a way to help move this little annoyance out of the way?

@trevnorris
Copy link

@tjfontaine you have any problems with #5637 ?

@jasnell
Copy link
Member

jasnell commented Aug 26, 2015

New PR opened over in nodejs/node. Will continue to track this discussion from there. nodejs/node#2369

@jasnell jasnell closed this as completed Aug 26, 2015
jasnell pushed a commit to nodejs/node that referenced this issue Nov 16, 2015
Exit the debug repl when repl emits 'exit'

Refs: nodejs/node-v0.x-archive#5637
Fixes: nodejs/node-v0.x-archive#5631
PR-URL: #2369
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Fishrock123 pushed a commit to nodejs/node that referenced this issue Nov 17, 2015
Exit the debug repl when repl emits 'exit'

Refs: nodejs/node-v0.x-archive#5637
Fixes: nodejs/node-v0.x-archive#5631
PR-URL: #2369
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit to nodejs/node that referenced this issue Dec 29, 2015
Exit the debug repl when repl emits 'exit'

Refs: nodejs/node-v0.x-archive#5637
Fixes: nodejs/node-v0.x-archive#5631
PR-URL: #2369
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit to nodejs/node that referenced this issue Jan 19, 2016
Exit the debug repl when repl emits 'exit'

Refs: nodejs/node-v0.x-archive#5637
Fixes: nodejs/node-v0.x-archive#5631
PR-URL: #2369
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants