Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
inspector: implement inspector for chakrashim
Browse files Browse the repository at this point in the history
Basic implementation of inspector for chakrashim using the v8_inspector
code as a basis. It supports mainline debugging scenarios using VS Code
and Chrome.

PR-URL: #210
Reviewed-By: Hitesh Kanwathirtha <hiteshk@microsoft.com>
  • Loading branch information
kfarnung committed Apr 28, 2017
1 parent 3d40cc1 commit a043cb8
Show file tree
Hide file tree
Showing 107 changed files with 4,270 additions and 9,649 deletions.
3 changes: 0 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1298,17 +1298,14 @@ def configure_intl(o):

def configure_inspector(o):
disable_inspector = (options.without_inspector or
options.with_intl in (None, 'none') or
options.without_ssl)
o['variables']['v8_enable_inspector'] = 0 if disable_inspector else 1

def configure_engine(o):
engine = options.engine.lower()
o['variables']['node_engine'] = engine
if engine != 'v8':
o['variables']['node_use_v8_platform'] = b(False)
o['variables']['node_use_bundled_v8'] = b(False)
o['variables']['v8_inspector'] = b(False)
o['variables']['v8_enable_i18n_support'] = 0

output = {
Expand Down
22 changes: 21 additions & 1 deletion deps/chakrashim/chakrashim.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
'variables': {
'library_files': [
'lib/chakra_shim.js',
'lib/chakra_debug.js'
'lib/chakra_debug.js',
'lib/chakra_inspector.js'
],
},

Expand All @@ -16,6 +17,7 @@
],

'include_dirs': [
'.',
'include',
'<(SHARED_INTERMEDIATE_DIR)',
'./../uv/include'
Expand Down Expand Up @@ -80,14 +82,25 @@
'include/v8-platform.h',
'include/v8-profiler.h',
'include/v8-version.h',
'src/base/logging.cc',
'src/base/logging.h',
'src/base/macros.h',
'src/base/platform/platform.cc',
'src/base/platform/platform.h',
'src/jsrtcachedpropertyidref.inc',
'src/jsrtcontextcachedobj.inc',
'src/jsrtcontextshim.cc',
'src/jsrtcontextshim.h',
'src/jsrtdebug.cc',
'src/jsrtdebug.h',
'src/jsrtinspector.cc',
'src/jsrtinspector.h',
'src/jsrtinspectorhelpers.cc',
'src/jsrtinspectorhelpers.h',
'src/jsrtisolateshim.cc',
'src/jsrtisolateshim.h',
'src/jsrtplatform.cc',
'src/jsrtplatform.h',
'src/jsrtpromise.cc',
'src/jsrtproxyutils.cc',
'src/jsrtproxyutils.h',
Expand All @@ -111,23 +124,30 @@
'src/v8int32.cc',
'src/v8integer.cc',
'src/v8isolate.cc',
'src/v8map.cc',
'src/v8message.cc',
'src/v8microtasksscope.cc',
'src/v8name.cc',
'src/v8number.cc',
'src/v8numberobject.cc',
'src/v8object.cc',
'src/v8objecttemplate.cc',
'src/v8persistent.cc',
'src/v8persistent.cc',
'src/v8private.cc',
'src/v8promise.cc',
'src/v8propertydescriptor.cc',
'src/v8proxy.cc',
'src/v8regexp.cc',
'src/v8script.cc',
'src/v8sharedarraybuffer.cc',
'src/v8set.cc',
'src/v8signature.cc',
'src/v8stacktrace.cc',
'src/v8string.cc',
'src/v8stringobject.cc',
'src/v8symbol.cc',
'src/v8symbolobject.cc',
'src/v8template.cc',
'src/v8trycatch.cc',
'src/v8typedarray.cc',
Expand Down
9 changes: 2 additions & 7 deletions deps/chakrashim/include/libplatform/libplatform.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,8 @@
namespace v8 {
namespace platform {

v8::Platform* CreateDefaultPlatform(int thread_pool_size = 0) {
return nullptr;
}

bool PumpMessageLoop(v8::Platform* platform, v8::Isolate* isolate) {
return false;
}
v8::Platform* CreateDefaultPlatform(int thread_pool_size = 0);
bool PumpMessageLoop(v8::Platform* platform, v8::Isolate* isolate);

/**
* Attempts to set the tracing controller for the given platform.
Expand Down
3 changes: 3 additions & 0 deletions deps/chakrashim/include/v8-debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ class V8_EXPORT Debug {
static Local<Context> GetDebugContext(Isolate* isolate);

static void EnableDebug();
static void EnableInspector();

static void SetLiveEditEnabled(Isolate* isolate, bool enable);
};

} // namespace v8
Loading

0 comments on commit a043cb8

Please sign in to comment.