Back to Content

GPUComputePassEncoder: insertDebugMarker() method

files/en-us/web/api/gpucomputepassencoder/insertdebugmarker/index.md

latest829 B
Original Source

{{APIRef("WebGPU API")}}{{SecureContext_Header}}{{AvailableInWorkers}}

The insertDebugMarker() method of the {{domxref("GPUComputePassEncoder")}} interface marks a specific point in a series of encoded compute pass commands with a label.

This could be used for telemetry, or may be utilized in {{domxref("GPUError")}} messages, browser dev tools, or other services in the future to help with debugging.

Syntax

js-nolint
insertDebugMarker(markerLabel)

Parameters

  • markerLabel
    • : A string representing the label to insert.

Return value

None ({{jsxref("Undefined")}}).

Examples

js
// …

passEncoder.insertDebugMarker("my_marker");

// …

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also