diff --git a/driver/js/src/vm/v8/v8_vm.cc b/driver/js/src/vm/v8/v8_vm.cc index 8e43e7adb08..57212d40372 100644 --- a/driver/js/src/vm/v8/v8_vm.cc +++ b/driver/js/src/vm/v8/v8_vm.cc @@ -88,6 +88,10 @@ V8VM::V8VM(const std::shared_ptr& param) : VM(param) { #endif FOOTSTONE_DLOG(INFO) << "Initialize"; v8::V8::Initialize(); +#ifdef ENABLE_INSPECTOR + auto trace = reinterpret_cast(platform->GetTracingController()); + devtools::DevtoolsDataSource::OnGlobalTracingControlGenerate(trace); +#endif } } create_params_.array_buffer_allocator = v8::ArrayBuffer::Allocator::NewDefaultAllocator(); diff --git a/framework/android/build.gradle b/framework/android/build.gradle index 14fd6c253f4..2e9a643fd2a 100644 --- a/framework/android/build.gradle +++ b/framework/android/build.gradle @@ -123,6 +123,7 @@ android { arguments ( "-DCMAKE_BUILD_TYPE=Debug", "-DMODULES=${getAllModules().join(';')}", + "-DENABLE_INSPECTOR=$ENABLE_INSPECTOR", *mergeCppDefinitions() ) diff --git a/framework/android/gradle.properties b/framework/android/gradle.properties index 0f1d472f854..5182f9e96a5 100644 --- a/framework/android/gradle.properties +++ b/framework/android/gradle.properties @@ -116,3 +116,8 @@ PUBLISH_ARTIFACT_ID=release # Specifies maven publish group ID # PUBLISH_GROUP_ID=com.tencent.hippy + +# +# Specifies DEVTOOL INSPECTOR OPEN OR NOT +# +ENABLE_INSPECTOR=true