Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/src/node.cc b/src/node.cc
index 5818520..84909c9 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -2084,6 +2084,14 @@ static Handle<Object> GetFeatures() {
HandleScope scope;
Local<Object> obj = Object::New();
+ obj->Set(String::NewSymbol("debug"),
+#if defined(DEBUG) && DEBUG
+ True()
+#else
+ False()
+#endif
+ );
+
obj->Set(String::NewSymbol("uv"), Boolean::New(use_uv));
obj->Set(String::NewSymbol("http1"), Boolean::New(use_http1));
obj->Set(String::NewSymbol("ipv6"), True()); // TODO ping libuv
diff --git a/test/simple/test-executable-path.js b/test/simple/test-executable-path.js
index 73948b6..1e7224a 100644
--- a/test/simple/test-executable-path.js
+++ b/test/simple/test-executable-path.js
@@ -23,7 +23,7 @@ var common = require('../common');
var assert = require('assert');
var path = require('path');
-var isDebug = (process.version.indexOf('debug') >= 0);
+var isDebug = process.features.debug;
var debugPath = path.normalize(path.join(__dirname, '..', '..',
'out', 'Debug', 'node'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.