When I run my code, Node.js throws a
"RangeError: Maximum call stack size exceeded" exception caused by too many recursive calls. I tried to increase Node.js stack size by
sudo node --stack-size=16000 app, but Node.js crashes without any error message. When I run this again without sudo, then Node.js prints
'Segmentation fault: 11'. Is there a possibility to solve this without removing my recursive calls?
This is different to other questions regarding an error message in Node that reads RangeError: Maximum call stack size exceeded in that I know exactly why I’m getting this error message. It’s happening because I’m recursing, recursing quite a lot in fact.
I know how to set the stack size thanks to:
How can I increase the maximum call stack size in Node.js
I’m a newbie to Go, coming from Node.JS.
In debugging a Python script, I’d really like to know the entire call stack for my entire program. An ideal situation would be if there were a command-line flag for python that would cause Python to print all function names as they are called (I checked
man Python2.7, but didn’t find anything of this sort).