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

node debug: cont past the end of the script freezes the debugger #25358

Closed
ackalker opened this issue May 20, 2015 · 5 comments
Closed

node debug: cont past the end of the script freezes the debugger #25358

ackalker opened this issue May 20, 2015 · 5 comments

Comments

@ackalker
Copy link

Using Node v0.12.3 on Arch Linux x86_64.

Steps to reproduce:

$ touch trivial.js # empty script
$ node debug trivial.js
< Debugger listening on port 5858
debug> . ok
break in trivial.js:2
  1 
> 2 });
debug> cont
debug> cont

At this point, the debugger is completely frozen, keyboard input doesn't echo and neither hitting ^C nor ^D is able to either regain control or exit the debugger. I have to switch to another terminal and forcibly kill the node process.

Besides the breakpoint line number being wrong (putting a console.log("Hello, world"); in trivial.js does give a correct line number, but the freeze problem remains), I would expect the first cont command to cause the debugger to display a message like "program terminated" or some such.
The second cont should at least display an error message, at which point users should still have the chance to either restart the script or exit the ebugger.
Users have come to expect this kind of behaviour from debuggers like GDB, etc.

@dnakamura
Copy link

Node versions affected: 0.12.3
Platforms affected: windows, linux
High priority/critical category: no
recommended priority:P2
Existing io.js issue: N/A
Pull request included: no
Reproducible: yes
Exists in later version: n/a
@joyent/node-coreteam

@jasnell
Copy link
Member

jasnell commented May 26, 2015

Able to reproduce on OSX 10.10.3

@piotrtomiak
Copy link

We have run into the same problem debugging over TCP. Basically, the nodejs process, if run with --debug-brk, never ends. Protocol seems to have started to behave strange in version 0.11.13, where "compileError" message was introduced and it plainly replaced "afterCompile" messages (#25266). Anyway, in versions 0.11.15 and over (including 0.12.0 and over) the process never terminates, if we call "continue" command after hitting the initial breakpoint. And that's a huge problem, as you have to manually kill the process, which should terminate by itself. It looks like some thread never finishes or so. This is a pretty bad user exprience if someone is debugging nodejs... Can you put a higher priority on this?

@mcshaman
Copy link

Same problem please fix

@CermakM
Copy link

CermakM commented Sep 3, 2017

Reproduced on GNU/Linux Fedora release 26

$node --version
v6.11.2

@Trott Trott closed this as completed Apr 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants