public RuntimeDebuggingService(JavaScriptRuntime runtime) { this.runtime = runtime; debugCallback = onDebugEvent; }
internal static extern JsErrorCode JsDiagStartDebugging( JsRuntime runtime, JsDiagDebugEventCallback debugEventCallback, IntPtr callbackState);
/// <summary> /// Request the runtime to break on next JavaScript statement. /// </summary> /// <remarks> /// The runtime should be in debug state. This API can be called from another runtime. /// </remarks> public void DiagRequestAsyncBreak(JsDiagDebugEventCallback debugEventCallback, IntPtr callbackState) { Native.ThrowIfError(Native.JsDiagRequestAsyncBreak(this)); }
public static extern JavaScriptErrorCode JsDiagStartDebugging(JavaScriptRuntime runtimeHandle, JsDiagDebugEventCallback debugEventCallback, IntPtr callbackState);
// Debug Functions /// <summary> /// Starts debugging in the given runtime. /// </summary> /// <param name="debugEventCallback">Registers a callback to be called on every JsDiagDebugEvent.</param> /// <param name="callbackState">User provided state that will be passed back to the callback.</param> /// <remarks> /// The runtime should be active on the current thread and should not be in debug state. /// </remarks> public void DiagStartDebugging(JsDiagDebugEventCallback debugEventCallback, IntPtr callbackState) { Native.ThrowIfError(Native.JsDiagStartDebugging(this, debugEventCallback, callbackState)); }