Skip to content

Instantly share code, notes, and snippets.

@jfirebaugh
Last active June 3, 2016 15:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfirebaugh/a63674302de1af7240be to your computer and use it in GitHub Desktop.
Save jfirebaugh/a63674302de1af7240be to your computer and use it in GitHub Desktop.
Tips and tricks for debugging native modules in node

Building a native module (node-gyp) with debug symbols

cd node_modules/module
node-gyp rebuild --debug

(You might have to adjust require paths from Release to Debug.)

Building node with debug symbols

Download sources and run:

./configure --debug

Then run using the node_g binary (a symlink to out/Debug/node).

Note that you might think that this would work:

nvm install -s <version> --debug

But nope, that actually still installs the release build of node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment