src,lib: v8-inspector support
This change introduces experimental v8-inspector support. This brings
the DevTools debug protocol allowing Node.js to be debugged with
Chrome DevTools native, or through other debuggers supporting that
protocol.
Partial WebSocket support, to the extent required by DevTools, is
included. This is derived from the implementation in Blink.
v8-inspector support can be disabled by the --without-inspector
configure flag.
PR-URL: https://github.com/nodejs/node/pull/6792
Reviewed-By: jasnell - James M Snell <[email protected]>
Reviewed-By: addaleax - Anna Henningsen <[email protected]>
Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]>
diff --git a/node.gyp b/node.gyp
index 0d32905..05a5530 100644
--- a/node.gyp
+++ b/node.gyp
@@ -250,6 +250,28 @@
'deps/v8/src/third_party/vtune/v8vtune.gyp:v8_vtune'
],
}],
+ [ 'v8_inspector=="true"', {
+ 'defines': [
+ 'HAVE_INSPECTOR=1',
+ 'V8_INSPECTOR_USE_STL=1',
+ ],
+ 'sources': [
+ 'src/inspector_agent.cc',
+ 'src/inspector_socket.cc',
+ 'src/inspector_socket.h',
+ 'src/inspector-agent.h',
+ ],
+ 'dependencies': [
+ 'deps/v8_inspector/v8_inspector.gyp:v8_inspector',
+ ],
+ 'include_dirs': [
+ 'deps/v8_inspector',
+ 'deps/v8_inspector/deps/wtf', # temporary
+ '<(SHARED_INTERMEDIATE_DIR)/blink', # for inspector
+ ],
+ }, {
+ 'defines': [ 'HAVE_INSPECTOR=0' ]
+ }],
[ 'node_use_openssl=="true"', {
'defines': [ 'HAVE_OPENSSL=1' ],
'sources': [
@@ -690,7 +712,10 @@
'target_name': 'cctest',
'type': 'executable',
'dependencies': [
+ 'deps/openssl/openssl.gyp:openssl',
+ 'deps/http_parser/http_parser.gyp:http_parser',
'deps/gtest/gtest.gyp:gtest',
+ 'deps/uv/uv.gyp:libuv',
'deps/v8/tools/gyp/v8.gyp:v8',
'deps/v8/tools/gyp/v8.gyp:v8_libplatform'
],
@@ -711,6 +736,20 @@
'sources': [
'test/cctest/util.cc',
],
+
+ 'conditions': [
+ ['v8_inspector=="true"', {
+ 'dependencies': [
+ 'deps/openssl/openssl.gyp:openssl',
+ 'deps/http_parser/http_parser.gyp:http_parser',
+ 'deps/uv/uv.gyp:libuv'
+ ],
+ 'sources': [
+ 'src/inspector_socket.cc',
+ 'test/cctest/test_inspector_socket.cc'
+ ]
+ }]
+ ]
}
], # end targets