js-debug launched the program with the internal console, so it had no
standard input and readline saw EOF at once. Run it in the debugger's
pseudo-terminal instead (integratedTerminal), like Python and the native
debuggers: the console's "Input for the program" line feeds its stdin.
A runInTerminal program was only reaped on Stop, so after it exited it
stayed a zombie. js-debug polls the processId it was given, saw it alive
and never ended the session ("Waiting for the debugger to disconnect...").
Reap the program as soon as it exits; Stop and replacement kill it only
while it still runs, so a reused pid is never signalled.