Show More Lines in a Node.js Error Stack Trace

Khaled Garbaya
InstructorKhaled Garbaya
Share this video with your friends

Social Share Links

Send Tweet
Published 6 years ago
Updated 4 years ago

Sometimes you are one or two lines short from finding the cause of the error in the stack trace but you can't because Nodejs displays only a handful of lines. In this lesson, you will learn how to increase the stack trace limit to show more lines

Srinivas  Kasiriveni
Srinivas Kasiriveni
~ 6 years ago

where exactly i can use this technique

Khaled Garbaya
Khaled Garbayainstructor
~ 6 years ago

Hi There, Error.stackTraceLimit is a global option you can use it as a way of debugging for examples if 10 levels deep is not enough, you can set it in your library for instance to allow the user to see more or less in the stack trace. I think codesandbox for example is setting it to 25 or more

Markdown supported.
Become a member to join the discussionEnroll Today