Skip to content

Latest commit

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

cpp-debug

Utilities for debugging Node.js C++ Addons

Installation

$ npm install cpp-debug

Usage

Add an include_dirs section to your project's binding.gyp file so that it resembles the following:

{
"targets": [
{
"target_name": "addon",
"sources": [ "binding.cc" ],
"include_dirs": [
"<!(node -e \"require('cpp-debug')\")"
]
}
]
}

Then include cpp-debug.h in your addon:

#include"cpp-debug.h"

Debug Functions

cpp-debug provides the following functions for use anywhere in your native addon code:

Return a string with a hex dump representation of the provided bytes.

std::string hexDump(constunsignedchar* data, unsignedint len)

Print a hex dump representation of the given data to stdout.

voidprintHexDump(constunsignedchar* data, unsignedint len)

License

MIT

About

Utilities for debugging Node.js C++ Addons

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages