Skip to content
You're viewing documentation for Draftbit Classic (v1), our previous platform. See the current Draftbit docs.

Console Logs

View console logs to help with debugging

Similar to the browser console, Draftbit’s Console Log let’s you see errors and log data during development. It’s used as a debugging tool and will display logs for the embedded previews as well as when previewing on a physical device.

You can pass values, such as the result of an Action or a Variable, and it will be printed to the console log. The console logs are located in the bottom drawer of the Builder. Any errors resulting from your Custom Code or Imported Packages will also be logged here.

You can log any data you need to the console using the Log to Console Action. The results of the Log to Console action are shown in the Console Logs tab in the bottom drawer of the Builder.

You can use a console.log() statement in your Functions or Files to see them logged in the Console Logs tab in the bottom drawer of the Builder.

In the example below, there is a Custom Code Component defined as follows:

import React from 'react';
import { Text } from 'react-native';
export const MyComponent = () => {
console.log('Console statement inside Custom Code Component triggered!');
return <Text>Hello world!</Text>;
};