Tutorial: Debug

Debug

Function Description

This article mainly introduces how to enable debug mode and realize the cloud upload and local export functions of full logs.

Debug mode is mainly used in:

  • Record full logs to better help debug problems
  • Support privatization customers who cannot report logs to export local log files

Prerequisites

  • TRTC Web SDK version >= 5.8.0.

Implementation Steps

Register the Plugin

import { Debug } from 'trtc-sdk-v5/plugins/Debug';
let trtc = TRTC.create({ plugins: [Debug] });

Note: The SDK will automatically enable the Debug plugin, you don't need to call the trtc.startPlugin() method.

Open the popup window

  • Development environment (file:, localhost, 127.0.0.1): Automatically opens popups.

  • Deployment environment: open popup window when detecting URL parameter contains trtcDebug, example: www.example.com/?trtcDebug=1

Disabling Debug

trtc.stopPlugin('Debug');

API Documentation

trtc.stopPlugin('Debug')

Disables the Debug plugin.

Plugin Effect

Full logs and network statistics

Logging Tab Key Information Highlighting Network Tab

Upload and Export Functions

Uploading Export