Repository navigation
In "node debug" in a certain reproducible scenario, typing "c" twice causes node to completley hang #4651
Description
Activity
I am unsure if this is a node debugger issue as opening
perlito5.jshangs my node process itself.
Also, it is quite hard to pin point the issue asperlito5.jsis >43k loc. :sI am having the same behaviour in a closed-source project. my project is not so big (although it depends in express and other small libraries).
It's possible this is related to #4819
I have removd all unrelated sources and reduced perlito5.js to a couple of lines and the bug is still reproducible. Please download the reduced version from my fork:
https://github.com/nacho4d/node-js-bug--debug-gets-stuck-on-two-c-commands
Just run:
node debug perlito5.jsI don't know if what I did is enough but I pulled the branch from #4819 and compiled and tried with that node version. I still see the same behaviour :(
I can do c++ but in this case I don't know where to start. If somebody can give me some pointers maybe I can look at this?
@nacho4d : thanks for your help and insights! I can reproduce the problem with your two lines-long program as well here (node-5.4.0 built from source on Mageia x86-64 cauldron).
Reacted by Guillermo Ignacio Enriquez GutierrezFWIW, Node.js 8.0.0-pre gives sensible feedback about what is going on here and does not hang.
$ ./node debug perlito.js (node:90329) [DEP0068] DeprecationWarning: `node debug` is deprecated. Please use `node inspect` instead. < Debugger listening on 127.0.0.1:9229. < To start debugging, open the following URL in Chrome: < chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9229/81a56490-14d3-488b-a726-537da2df7e3a < Debugger attached. Break on start in perlito.js:1 > 1 (function (exports, require, module, __filename, __dirname) { 2 "use strict"; 3 var isNode = typeof require != "undefined"; debug> c < Waiting for the debugger to disconnect... debug> c Error: Use `run` to start the app again. at Promise (node-inspect/lib/internal/inspect_client.js:238:16) at Promise (<anonymous>) at Client.callMethod (node-inspect/lib/internal/inspect_client.js:236:12) at Proxy.callVirtualMethod (node-inspect/lib/_inspect.js:140:23) at Object.get cont [as cont] (node-inspect/lib/internal/inspect_repl.js:852:25) at repl:1:1 at ContextifyScript.Script.runInContext (vm.js:53:29) at Object.runInContext (vm.js:108:6) at REPLServer.controlEval (node-inspect/lib/internal/inspect_repl.js:521:25) at bound (domain.js:301:14) debug>
First
cgoes to the end of the program. Nextcis an error because the program has already terminated.Node.js 8.0.0 is expected to be released mid- or late May.
Reacted by Mudit and Guillermo Ignacio Enriquez GutierrezThis is unlikely to be fixed in older versions and the debugger is now removed in newer versions. Closing. We can reopen if necessary
- On Mon, 29 May 2017 21:27:33 -0700 James M Snell ***@***.***> wrote: This is unlikely to be fixed in older versions and the debugger is now removed in newer versions. Closing. We can reopen if necessaryHi! Just a question - what can I use now instead of the removed debugger?…-- @shlomif-- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Perl Humour - http://perl-begin.org/humour/ It always works at the end. Too bad it doesn't work right at the beginning. — Shlomi Fish’s relative. Please reply to list if it's a mailing list post - http://shlom.in/reply .
@shlomif You can use
node inspect script.jsinstead. The commands are the same. It just uses the V8 inspector instead of the old debugger.- On Tue, 30 May 2017 00:53:06 -0700 Michaël Zasso ***@***.***> wrote: @shlomif You can use `node inspect script.js` instead. The commands are the same. It just uses the V8 inspector instead of the old debugger.Thanks for the info, Michael!…-- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ http://www.shlomifish.org/humour/bits/facts/Summer-Glau/ Chuck Norris makes sure his ciphers are unbreakable by killing all the crypto experts that could possibly break them. — http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/ Please reply to list if it's a mailing list post - http://shlom.in/reply .
Please see the reproducing test case here: https://github.com/shlomif/node-js-bug--debug-gets-stuck-on-two-c-commands namely doing:
Causes the debugger to hang without being able to interrupt using either ctrl+c or ctrl+z. I'm using node-v5.4.0 on Mageia Linux x86-64 v6. More info can be found in the link.