Skip to main content

debug

plugin.debug.debug(log: string, type: logType): Promise<DebugAddLogResponse>

Sends a log message to the debug websocket and waits for a response.

Parameters

ParameterTypeRequiredDescription
logstringYesThe log message to send.
typelogTypeYesThe type of the log message (info, error, warning).

Returns

Promise<DebugAddLogResponse> — A promise that resolves with the response from the debug event.

Example

import plugin from '@codebolt/plugin-sdk';

const result = await plugin.debug.debug('log', /* logType */);
console.log(result);