Skip to main content

debug

codebolt.debug.debug(log: string, type: logType): Promise<DebugAddLogResponse>
Sends a log message to the debug websocket and waits for a response.

Parameters

NameTypeDescription
logstringThe log message to send.
typelogTypeThe type of the log message (info, error, warning).

Returns:

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

Example

//error is a varialbe that stored error log 
const error = "error log"

//// Calling the `codebolt.debug.debug` method to log the error with its type (e.g., "warning", "error", etc.)
const fileData = await codebolt.debug.debug(error, "error")

//after executing this command then show the error in debug section on coltbolt.

debug

Explaination

While executing the codebolt.debug.debug method, the error will be shown in the debug section of Codebolt.