Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including tracey with all npm packages installed. Try it out:

var tracey = require("tracey")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

tracey v0.2.1

Get a parsed stack trace for the current location


Get a nice parsed stack trace from the calling location


npm install tracey


Capturing the current call stack

var tracey = require('tracey');

var stack = tracey();

Or you can pass an exception to parse its stack frames

try {
    // .. something bad
} catch (ex) {
    var error_stack = tracey(ex);

Tracy returns an array of frame objects with the following properties:

  • path - the full file path of the executing code
  • line - the line number of the executing code
  • column - the column number of the executing code
  • func - the name of the function call
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free