-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inspector: allow opening inspector when NODE_V8_COVERAGE
is set
#46113
inspector: allow opening inspector when NODE_V8_COVERAGE
is set
#46113
Conversation
868efc8
to
44f774c
Compare
NODE_V8_COVERAGE
is setNODE_V8_COVERAGE
is set
CC @nodejs/inspector |
I kind of feel this is more a hack or workaround than a proper fix, possibly with undesirable side effects.
Maybe the Lines 942 to 946 in 513c151
Or maybe it's sometimes needed - but in this case it gives the wrong behavior. |
CMIIW, code coverage creates its own inspector session but doesn't start the agent thread while diff --git a/src/inspector_js_api.cc b/src/inspector_js_api.cc
index 3595536c78..1602faf1bd 100644
--- a/src/inspector_js_api.cc
+++ b/src/inspector_js_api.cc
@@ -273,7 +273,7 @@ static void RegisterAsyncHookWrapper(const FunctionCallbackInfo<Value>& args) {
void IsEnabled(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
- args.GetReturnValue().Set(InspectorEnabled(env));
+ args.GetReturnValue().Set(env->inspector_agent()->IsListening());
}
void Open(const FunctionCallbackInfo<Value>& args) { |
44f774c
to
4d2eca7
Compare
thanks @cola119! I have pushed your suggestion |
Landed in 7b4cc58 |
PR-URL: #46113 Fixes: #46110 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #46113 Fixes: #46110 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #46113 Fixes: #46110 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #46113 Fixes: #46110 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
Fixes: #46110