Skip to content

Commit 8b8c615

Browse files
committed
Added 'setLiveEditEnabled' method
1 parent 59f8ce5 commit 8b8c615

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/debug.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,14 @@ namespace nodex {
125125
v8::Debug::CancelDebugBreak(info.GetIsolate());
126126
}
127127

128+
static NAN_METHOD(SetLiveEditEnabled) {
129+
#if (NODE_MODULE_VERSION > 45)
130+
Local<Boolean> _enabled = CHK(To<Boolean>(info[0]));
131+
bool enabled = _enabled->Value();
132+
v8::Debug::SetLiveEditEnabled(info.GetIsolate(), enabled);
133+
#endif
134+
}
135+
128136
private:
129137
Debug() {}
130138
~Debug() {}
@@ -143,6 +151,7 @@ namespace nodex {
143151
SetMethod(target, "shareSecurityToken", Debug::ShareSecurityToken);
144152
SetMethod(target, "unshareSecurityToken", Debug::UnshareSecurityToken);
145153
SetMethod(target, "setPauseOnNextStatement", Debug::SetPauseOnNextStatement);
154+
SetMethod(target, "setLiveEditEnabled", Debug::SetLiveEditEnabled);
146155
}
147156

148157
NODE_MODULE(debug, Initialize)

v8-debug.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ V8Debug.prototype.setPauseOnNextStatement = function(pause) {
177177
binding.setPauseOnNextStatement(pause === true);
178178
};
179179

180+
V8Debug.prototype.setLiveEditEnabled = function(enabled) {
181+
binding.setLiveEditEnabled(enabled === true);
182+
};
183+
180184
V8Debug.prototype.scripts = function() {
181185
return this._Debug.scripts();
182186
};

0 commit comments

Comments
 (0)