debug
codebolt.debug.debug(log: string, type: logType): Promise<DebugAddLogResponse>
Sends a log message to the debug websocket and waits for a response.
Parameters
Name | Type | Description |
---|---|---|
log | string | The log message to send. |
type | logType | The 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.
Explaination
While executing the codebolt.debug.debug method, the error will be shown in the debug section of Codebolt.