Skip to content

TracingJSRuntime class

Wraps a JSRuntime and traces all the calls from .NET to JS, including basic inspection of arguments, out values, and return status.

C#
public class TracingJSRuntime : JSRuntime

Public Members

namedescription
TracingJSRuntime(…)
Trace { get; }
override AcquireThreadSafeFunction(…)
override AddAsyncCleanupHook(…)
override AddEnvCleanupHook(…)
override AddFinalizer(…)(2 methods)
override AdjustExternalMemory(…)
override AsyncDestroy(…)
override AsyncInit(…)
override AwaitPromise(…)
override CallFunction(…)
override CallThreadSafeFunction(…)
override CancelAsyncWork(…)
override CheckObjectTypeTag(…)
override CloseCallbackScope(…)
override CloseEscapableHandleScope(…)
override CloseHandleScope(…)
override CoerceToBool(…)
override CoerceToNumber(…)
override CoerceToObject(…)
override CoerceToString(…)
override CreateArray(…)(2 methods)
override CreateArrayBuffer(…)(2 methods)
override CreateAsyncWork(…)
override CreateBigInt(…)(3 methods)
override CreateBuffer(…)
override CreateBufferCopy(…)
override CreateDataView(…)
override CreateDate(…)
override CreateEnvironment(…)
override CreateError(…)
override CreateExternal(…)
override CreateExternalBuffer(…)
override CreateFunction(…)
override CreateNumber(…)(4 methods)
override CreateObject(…)
override CreatePlatform(…)
override CreatePromise(…)
override CreateRangeError(…)
override CreateReference(…)
override CreateString(…)(2 methods)
override CreateSymbol(…)
override CreateSyntaxError(…)
override CreateThreadSafeFunction(…)
override CreateTypedArray(…)
override CreateTypeError(…)
override DefineClass(…)
override DefineProperties(…)
override DeleteAsyncWork(…)
override DeleteElement(…)
override DeleteProperty(…)
override DeleteReference(…)
override DestroyEnvironment(…)
override DestroyPlatform(…)
override DetachArrayBuffer(…)
override EscapeHandle(…)
override FatalError(…)
override FatalException(…)
override Freeze(…)
override GetAllPropertyNames(…)
override GetAndClearLastException(…)
override GetArrayBufferInfo(…)
override GetArrayLength(…)
override GetBigIntWordCount(…)
override GetBigIntWords(…)
override GetBoolean(…)
override GetBufferInfo(…)
override GetCallbackArgs(…)
override GetCallbackInfo(…)
override GetDataViewInfo(…)
override GetElement(…)
override GetGlobal(…)
override GetInstanceData(…)
override GetLastErrorInfo(…)
override GetModuleFileName(…)
override GetNamedProperty(…)
override GetNewTarget(…)
override GetNodeVersion(…)
override GetNull(…)
override GetProperty(…)
override GetPropertyNames(…)
override GetPrototype(…)
override GetReferenceValue(…)
override GetSymbolFor(…)
override GetThreadSafeFunctionContext(…)
override GetTypedArrayInfo(…)
override GetUndefined(…)
override GetUVEventLoop(…)
override GetValueArrayBuffer(…)
override GetValueBigInt64(…)(2 methods)
override GetValueBool(…)
override GetValueDataView(…)
override GetValueDate(…)
override GetValueDouble(…)
override GetValueExternal(…)
override GetValueInt32(…)
override GetValueInt64(…)
override GetValueStringUtf16(…)
override GetValueStringUtf8(…)
override GetValueType(…)
override GetValueTypedArray(…)
override GetValueUInt32(…)
override GetVersion(…)
override HasElement(…)
override HasNamedProperty(…)
override HasOwnProperty(…)
override HasProperty(…)
override InstanceOf(…)
override IsArray(…)
override IsArrayBuffer(…)
override IsAvailable(…)
override IsBuffer(…)
override IsDataView(…)
override IsDate(…)
override IsDetachedArrayBuffer(…)
override IsError(…)
override IsExceptionPending(…)
override IsPromise(…)
override IsTypedArray(…)
override MakeCallback(…)
override NewInstance(…)
override OpenCallbackScope(…)
override OpenEscapableHandleScope(…)
override OpenHandleScope(…)
override QueueAsyncWork(…)
override RefReference(…)
override RefThreadSafeFunction(…)
override RegisterModule(…)
override RejectDeferred(…)
override ReleaseThreadSafeFunction(…)
override RemoveAsyncCleanupHook(…)
override RemoveEnvCleanupHook(…)
override RemoveWrap(…)
override ResolveDeferred(…)
override RunEnvironment(…)
override RunScript(…)
override Seal(…)
override SetElement(…)
override SetInstanceData(…)
override SetNamedProperty(…)
override SetObjectTypeTag(…)
override SetProperty(…)
override StrictEquals(…)
override Throw(…)
override ThrowError(…)
override ThrowRangeError(…)
override ThrowSyntaxError(…)
override ThrowTypeError(…)
TraceCallback<TDescriptor>(…)Traces a callback function, method, getter, or setter, including args and return value. (When tracing is enabled, this method replaces the normal InvokeCallback method.)
override UnrefReference(…)
override UnrefThreadSafeFunction(…)
override Unwrap(…)
override Wrap(…)(2 methods)
const CallTrace
const ExceptionTrace
const ReturnTrace

Examples

Produces output similar to:

C#
< CreateObject()
> CreateObject(000001E984E19BB0 object)
< DefineProperties(000001E984E19BB0 object, [hello(), toString()])
> DefineProperties(ok)
< Wrap(000001E984E19BB0 object, 0x000001E984CE4580 RuntimeType)
> Wrap(@000001E9808E7840 000001E984E19BF0 object)
< DefineProperties(000001E984E19B80 object, [Example])
> DefineProperties(ok)
< GetValueType(000001E984E19B80 object)
> GetValueType(object)
< GetInstanceData()
> GetInstanceData(0x000001E984CE1300 JSRuntimeContext)
< GetCallbackInfo(0000000CB8DFE560)
> GetCallbackInfo(1, 0x000001E984CE4590 JSPropertyDescriptor)
< GetCallbackArgs(0000000CB8DFE560, [1])
> GetCallbackArgs(0000000CB8DFE8C8 object, 0000000CB8DFE8D0 string ".NET")

See Also

Released under the MIT license