diff --git a/ark_runtime/jsvm/jsvm.h b/ark_runtime/jsvm/jsvm.h index a7530de2a3d083c07abce8c66253198f4427745c..c5cf07f513ff1b2eb754f2b483c19b7a03b10bb6 100644 --- a/ark_runtime/jsvm/jsvm.h +++ b/ark_runtime/jsvm/jsvm.h @@ -2852,6 +2852,22 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateFunctionWithScript(JSVM_Env env, JSVM_Value script, JSVM_Value* result); +/** + * @brief This function activates insepctor with pid and alias it. + * + * @param env: The environment that the API is invoked under. + * @param pid: A process id to identify the inspector connection. + * @param name: An alias for the inspector that under a specific pid. + * default name is jsvm if a nullptr is passed in. + * @return Returns JSVM funtions result code. + * Returns {@link JSVM_OK } if the function executed successfully.\n + * Returns {@link JSVM_PENDING_EXCEPTION } if an exception occurs.\n + * @since 12 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_OpenInspectorWithName(JSVM_Env env, + int pid, + const char* name); + EXTERN_C_END /** @} */ diff --git a/ark_runtime/jsvm/libjsvm.ndk.json b/ark_runtime/jsvm/libjsvm.ndk.json index 37f66255e7d03e9c844e08197cbf9ee7d7fa49e5..63bddfc3c40e535a52ac12407c36f9f361dfecb7 100644 --- a/ark_runtime/jsvm/libjsvm.ndk.json +++ b/ark_runtime/jsvm/libjsvm.ndk.json @@ -690,5 +690,9 @@ { "first_introduced": "12", "name": "OH_JSVM_CreateFunctionWithScript" + }, + { + "first_introduced": "12", + "name": "OH_JSVM_OpenInspectorWithName" } ]