diff --git a/src/node.cc b/src/node.cc index 5818520934..84909c90eb 100644 --- a/src/node.cc +++ b/src/node.cc @@ -2084,6 +2084,14 @@ static Handle GetFeatures() { HandleScope scope; Local 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 73948b66f1..1e7224a4a8 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'));