We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a0fca7 commit 75a3c78Copy full SHA for 75a3c78
1 file changed
src/debug.cc
@@ -94,7 +94,13 @@ namespace nodex {
94
if (expression.IsEmpty())
95
RETURN(Undefined());
96
97
- Context::Scope context_scope(v8::Debug::GetDebugContext());
+ Local<Context> debug_context = v8::Debug::GetDebugContext();
98
+ if (debug_context.IsEmpty()) {
99
+ // Force-load the debug context.
100
+ v8::Debug::GetMirror(info.GetIsolate()->GetCurrentContext(), info[0]);
101
+ debug_context = v8::Debug::GetDebugContext();
102
+ }
103
+ Context::Scope context_scope(debug_context);
104
105
TryCatch tryCatch;
106
MaybeLocal<Value> result;
0 commit comments