More than 10 lines in a node.js stack error?

后端 未结 4 1896
花落未央
花落未央 2020-12-07 11:11

Is there a way to get more than 10 lines in a node.js stack error?

function a() { dieInHell(); }
function b() { a(); }
function c() { b(); }
function d() { c         


        
4条回答
  •  北海茫月
    2020-12-07 11:35

    Also you can use built-in debugger, which opens familiar Google Chrome's dev-tools debugger. It stops on any error and you can browse the whole stack. Just run:

    $ node --inspect debug.js
    
    Debugger listening on port 9229.
    To start debugging, open the following URL in Chrome: chrome-devtools://devtools/remote/serve_file/...
    

提交回复
热议问题